9.1. Predicting Bike Rentals

The data we will use in this chapter is used with the permission of Capital Bikeshare. You can download the data from their website. We are using a prepared version of this data that has already been augmented with additional weather data which you can download from the UCI Machine Learning Repository.

The basic data for the sql lessons is in bikeshare.db The additional data about whether is not needed until the last section of this chapter in which we try to predict bike rentals. Later sections of this chapter use bikeshare_11_12.db which has the same schema as bikeshare.db but data for two years instead of just one. These two files are sqllite database files, feel free to download them and use them with sqllite directly.

Predicting bike rental trends is very important from both an operational and planning perspective. Bikeshare companies need to stay up to date on rental trends to know where they should add new facilities, and how to reposition bikes to get them to the locations with the highest demand. They do not want to wait until all of the bikes are rented at a particular location before moving additional bikes into position, as that is lost revenue for them.

Both hour.csv and day.csv have the following fields (with the exception of hr which is not available in day.csv).

You can read about UCI’s work with this data set here. <https://link.springer.com/article/10.1007/s13748-013-0040-3>

You have attempted of activities on this page