Abstract
The growing role of metro systems in urban mobility calls for high-quality metro transit datasets. Derived from over 700 million smart card records, an open-sourced, city-scale metro flow dataset was constructed, covering the period of May-August 2017 and 302 metro stations in Shanghai, China. The in-out flow counts of each station and OD flow between stations were offered at a 10-minute temporal resolution. By leveraging the mobility patterns of each passenger, metro flows were categorized into commuting flows, home-based-other flows, and none-home-based flows, providing a more comprehensive perspective towards urban mobility dynamics. Supplemental metadata, including station attributes, network topology, and meteorological records further support potential applications. This city-scale metro flow dataset could be utilized in advancing research in transportation modeling, spatio-temporal data mining, and urban mobility analysis.
Introduction
Understanding the dynamics of human mobility in megacities is essential for urban planning, epidemic modeling, and transportation optimization. While Automatic Fare Collection (AFC) or "Smart Card" data provides a wealth of information, existing public datasets often suffer from coarse temporal resolution, a lack of semantic context regarding trip purpose, and missing environmental metadata. This paper introduces a high-resolution, city-scale dataset for the Shanghai metro system that addresses these gaps, providing a standardized, multi-dimensional view of one of the world's busiest transit networks.
Methods
The dataset was constructed by processing raw transaction records from Shanghai’s AFC system between May and August 2017. A primary technical challenge was the absence of entry times in raw records; the researchers utilized the Gaode (Amap) Route Planning API to estimate travel durations and back-calculate entry times based on recorded exit times.
Beyond simple flow counts, the team developed an algorithm to infer "Home" and "Work" stations for approximately 19.69 million unique users. By analyzing frequency thresholds (40%) for morning entries and evening exits, trips were categorized into three semantic types:
- Commuting (C): Trips between home and workplace.
- Home-Based-Other (HBO): Trips starting or ending at home for non-work purposes.
- None-Home-Based (NHB): Trips neither starting nor ending at home.
To ensure privacy, individual trajectories were aggregated into station-level inflow/outflow and Origin-Destination (OD) pairs at 10-minute intervals.
Dataset Description
The released dataset includes several components to facilitate comprehensive analysis:
- Station Metadata: GPS locations and network topology (neighboring stations).
- Flow Data: 10-minute counts of C, HBO, and NHB trips for 302 stations, alongside a 12GB sparse matrix for OD flows.
- Environmental Context: Hourly temperature and precipitation data for the study period.
- Calendar Data: A mapping of workdays versus holidays based on 2017 government schedules.
Key Insights and Results
Analysis of the dataset reveals distinct "personalities" for different urban zones. For instance, central business districts like People’s Square exhibit high morning outflows and evening inflows, while suburban hubs like Xinzhuang show the inverse, acting as residential commuter anchors.
Spatial analysis shows that metro trip distances follow a truncated power-law distribution, peaking at approximately 10km. Shorter trips are less frequent, likely due to competition from "last-mile" solutions like bike-sharing. Furthermore, the data indicates that leisure travel (HBO/NHB) is significantly more elastic to weather conditions than commuting travel; while rainstorms deter shopping trips, they have a negligible impact on work-related transit.
Conclusion and Future Work
This dataset provides a robust foundation for urban mobility research, validated against historical sets with a Pearson Correlation Coefficient exceeding 0.99. While the four-month span is extensive, limitations include the assumption of static user profiles (not accounting for job or home changes) and occasional data gaps due to system anomalies. Future work may involve imputing missing data and expanding the semantic labeling to include more granular trip purposes.
Summary updated