Exploratory and visual analysis of Barcelona's public bike-sharing service based on a dataset of 223 million rows across annual files (2020–2024).
The process started with individual exploration of each annual file: removing null values, dropping irrelevant columns, and normalising schemas to enable merging all years into a single dataset. Given the data volume, the resulting file was compiled into Parquet format, significantly reducing load and processing times compared to working with CSV files.
Processing the full dataset for heat map generation was not feasible in memory. A 10,000-record sample was built using stratification criteria by neighbourhood, time of day, and month of year, ensuring the sample remained representative of real usage patterns.
The dataset does not directly record whether a bike is in use. To approximate this, the difference between each station's maximum capacity and available bikes at any given moment was used as an estimate of bikes in circulation. This approach introduces a known bias: the van system that redistributes bikes between stations can create gaps or surpluses that do not reflect real demand.
Despite this limitation, the visual analysis reveals a consistent differential pattern: coastal neighbourhoods with lower income levels concentrate usage in the early morning hours, while wealthier neighbourhoods show higher activity between 17:00–19:00. The pattern holds stable across different days and months, suggesting it reflects real mobility behaviour rather than operational noise from the redistribution system.