项目作者: IfyOjialor

项目描述 :
An analysis of the Bike Share data using R programming.
高级语言: R
项目地址: git://github.com/IfyOjialor/project2.git
创建时间: 2020-10-09T13:36:02Z
项目社区:https://github.com/IfyOjialor/project2

开源协议:

下载


Bike Share Analysis


Author: Ifeoma Ojialor
Date: 10/16/2020

Over the past decade, bicycle-sharing systems has been growing in number and popularity in cities across the world. Bicycle-sharing systems allow users to rent bicycles for short trips, typically 30 minutes or less. The wealth of data from these systems can be used to explore how these bike-sharing systems are used.

In this project, I have performed an exploratory data analysis on the data provided by the UCL Machine Learning repository available [here] (https://archive.ics.uci.edu/ml/datasets/Bike+Sharing+Dataset). The purpose of this repo is to store the relevant files and information needed for predicting the total count of bikes in a bike share program. I used the regression tree and boosted tree model to predict the total count of bikes. As usual, EDA was conducted before building the model. The weekday variable was automated to include files for each weekday. The sub-documents are available below;

The following libraries are required for this analysis;

library(readr)
library(ggplot2)
library(corrplot)
library(caret)
library(rmarkdown)
library(dplyr)
library(tidyverse)

Code used to automate the weekday parameter;

  1. weekdays <- unique(day1$weekday)
  2. #create filenames
  3. output_file <- paste0(weekdays, ".md")
  4. #create a list for each weekday with just the day parameter
  5. params <- lapply(weekdays, FUN = function(x){list(days = x)})
  6. #put into a data frame
  7. reports <- tibble(output_file, params)
  8. reports
  9. library(rmarkdown)
  10. apply(reports, MARGIN = 1,
  11. FUN = function(x){
  12. render(input = "Proj2.Rmd", output_file = x[[1]], params = x[[2]])})