Kemal Dostel

Public Bike Sharing

Testing a hypothesis on bike-sharing usage with Python and k-means clustering.

Project

Public Bike Sharing

May 9, 2021
Average hourly bike usage in 2019
Average hourly bike usage in 2019
Average hourly bike usage in 2020
Average hourly bike usage in 2020

Overall hourly bike usage was lower in 2020 than in 2019. However, including every station has one major problem: some stations are used far less than popular ones (rural versus populated areas, for example). To overcome this, the data was normalised and k-means clustering was used to form three clusters. The clustering worked well and the clusters are clearly separated. One insight: during Covid-19 (2020), stations near living areas saw an overall increase in hourly trips at different times of day compared with 2019.

Example cluster: stations near living areas, 2019
Example cluster: stations near living areas, 2019
Example cluster: stations near living areas, 2020
Example cluster: stations near living areas, 2020

View the code on GitHub

← All projects