Title: | Analysis and Prediction of Bicycle Rental Amount |
---|---|
Description: | Provides functions for analyzing citizens' bicycle usage pattern and predicting rental amount on specific conditions. Functions on this package interacts with data on 'tashudata' package, a 'drat' repository. 'tashudata' package contains rental/return history on public bicycle system('Tashu'), weather for 3 years and bicycle station information. To install this data package, see the instructions at <https://github.com/zeee1/Tashu_Rpackage>. top10_stations(), top10_paths() function visualizes image showing the most used top 10 stations and paths. daily_bike_rental() and monthly_bike_rental() shows daily, monthly amount of bicycle rental. create_train_dataset(), create_test_dataset() is data processing function for prediction. Bicycle rental history from 2013 to 2014 is used to create training dataset and that on 2015 is for test dataset. Users can make random-forest prediction model by using create_train_model() and predict amount of bicycle rental in 2015 by using predict_bike_rental(). |
Authors: | Jiwon Min [aut, cre] |
Maintainer: | Jiwon Min <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1.1 |
Built: | 2025-03-03 05:04:50 UTC |
Source: | https://github.com/cran/tashu |
A function to create training dataset on 'station_number' bicycle station by preprocessing bicycle rental history and weather data from 2013 to 2014.
create_test_dataset(station_number)
create_test_dataset(station_number)
station_number |
number that means the number of each station.(1 ~ 144) |
a dataset containing feature and rental count data on 'station_number' station, 2013 ~ 2014
## Not run: test_dataset <- create_test_dataset(1)
## Not run: test_dataset <- create_test_dataset(1)
A function to create training dataset on 'station_number' bicycle station by preprocessing bicycle rental history and weather data from 2013 to 2014.
create_train_dataset(station_number)
create_train_dataset(station_number)
station_number |
number that means the number of each station.(1 ~ 144) |
a dataset containing feature and rental count data on 'station_number' station, 2013 ~ 2014
## Not run: train_dataset <- create_train_dataset(1)
## Not run: train_dataset <- create_train_dataset(1)
Create random-forest training model for bicycle rental prediction.
create_train_model(train_dataset)
create_train_model(train_dataset)
train_dataset |
Training dataset created by create_train_dataset() |
random forest training model
## Not run: train_dataset <- create_train_dataset(3) rf_model <- create_train_model(train_dataset) ## End(Not run)
## Not run: train_dataset <- create_train_dataset(3) rf_model <- create_train_model(train_dataset) ## End(Not run)
A function analyzing bicycle rental pattern on each day of week and visualizing analyzed result.
daily_bicycle_rental()
daily_bicycle_rental()
## Not run: daily_bicycle_rental()
## Not run: daily_bicycle_rental()
Extract feature columns from train/test dataset
extract_features(data)
extract_features(data)
data |
data with feature columns and others |
data containing only feature columns
A function drawing a plot that shows change of temperature and bicycle rental ratio in each month.
monthly_bicycle_rental()
monthly_bicycle_rental()
## Not run: monthly_bicycle_rental()
## Not run: monthly_bicycle_rental()
predict hourly amount of bicycle rental in 2015 using random forest algorithm. Create prediction model using 'train_dataset' and forecast demand of bicycle rental according to the condition of 'test_dataset'
predict_bicycle_rental(rf_model, test_dataset)
predict_bicycle_rental(rf_model, test_dataset)
rf_model |
random forest prediction model create by create_train_model() |
test_dataset |
testing dataset |
test_dataset with predictive result.
## Not run: train_dataset <- create_train_dataset(3) test_dataset <- create_test_dataset(3) rf_model <- create_train_model(train_dataset) test_dataset <- predict_bicycle_rental(rf_model, test_dataset) ## End(Not run)
## Not run: train_dataset <- create_train_dataset(3) test_dataset <- create_test_dataset(3) rf_model <- create_train_model(train_dataset) test_dataset <- predict_bicycle_rental(rf_model, test_dataset) ## End(Not run)
Visualize Top 10 Pathes that were most used from 2013 to 2015.
top10_paths()
top10_paths()
## Not run: top10_paths()
## Not run: top10_paths()
Draw a plot that visualized most used top 10 stations on barchart.
top10_stations()
top10_stations()
Data frame that contains top 10 most used stations from 2013 to 2015
## Not run: top10_stations()
## Not run: top10_stations()