| Title: | 'São Paulo' Metro Passenger Demand Data |
|---|---|
| Description: | Provides passenger demand data for the 'São Paulo' metro system, covering 2012 to 2025. Datasets include monthly passenger entries and transported counts by line, average weekday station entries, daily station entries, and spatial geometries for metro and commuter train lines and stations. |
| Authors: | Vinicius Oike [aut, cre] |
| Maintainer: | Vinicius Oike <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.0.0 |
| Built: | 2026-06-04 06:36:49 UTC |
| Source: | https://github.com/cran/metrosp |
Spatial line geometries for Sao Paulo metro (METRO SP) and commuter train (CPTM) lines, including both currently operating lines and planned future expansions.
lineslines
An sf data frame with LINESTRING geometry (CRS: WGS84 / EPSG:4326) and the following columns:
Official line number (integer).
Portuguese color name of the line (character).
English color name of the line (character).
Operating company name (character).
Either "metro" (METRO SP) or "train" (CPTM)
(character).
Either "current" (operating) or "future"
(planned expansion) (character).
Line route geometry (sfc_LINESTRING).
Requires the sf package to work with spatial features. The distinction between types isn't always consistent, but we follow GeoSampa's classification. Broadly speaking, the "metro" runs undergrounds as a subway, and "train" runs above grounds as a commuter rail (although there are exceptions)
GeoSampa, Prefeitura de Sao Paulo. https://geosampa.prefeitura.sp.gov.br/
stations for station point locations.
A named character vector of official hex color codes for the six metro lines operated by METRO SP (Lines 1-3, 5, 15) and ViaMobilidade Line 4.
metro_colorsmetro_colors
A named character vector of length 6. Names are English color names; values are hex color codes:
Line 1 — "#171796"
Line 2 — "#007A5E"
Line 3 — "#ED2E38"
Line 4 — "#FFD525"
Line 5 — "#874ABF"
Line 15 — "#8F8F8C"
Colors follow the official METRO SP and ViaMobilidade branding. Only the six currently operating metro lines are included; CPTM train lines and planned future lines (e.g., Line 6 Orange, Line 17 Gold) are not covered.
metro_lines for the full line reference table.
A reference tibble mapping metro line numbers to their Portuguese and English color names. Covers all METRO SP and ViaMobilidade lines including planned future lines and the network total.
metro_linesmetro_lines
A tibble with 13 rows and 3 columns:
Official line number (integer). Includes 1, 2, 3, 4, 5, 6, 15, 16, 17, 19, 20, 22, and 99 (network total).
Portuguese color name of the line (character).
English color name of the line (character).
This dataset serves as a dimension/lookup table for joining line names onto
passenger and station datasets. Not all lines have passenger data — some
(e.g., Lines 6, 16, 17) are planned future lines with only spatial geometry
available in lines.
metro_colors for official hex color codes,
lines for spatial line geometries.
Monthly count of passengers entering Sao Paulo metro stations, aggregated by metro line. Data covers October 2017 through 2025, sourced from the METRO SP transparency portal.
passengers_entrancepassengers_entrance
A data frame with the following columns:
First day of the month (Date).
Metro line number: 1, 2, 3, 4, 5, 15, or 99 for network total (integer).
Abbreviated metric code (character). One of: "total", "mdu", "msa", "mdo", "max".
Passenger count in thousands (numeric).
Measurement type in Portuguese (character). One of: "Total", "Media dos Dias Uteis", "Media dos Sabados", "Media dos Domingos", "Maxima Diaria".
English name of the metro line (character).
Portuguese name of the metro line (character).
Calendar year (integer).
Lines 1, 2, 3, and 15 come from the METRO transparency portal (2017-2025). Lines 4 (Amarela) and 5 (Lilas) come from the Insper Dataverse source (2020-2025). The network total (line_number = 99) may not be available for all years.
Values represent thousands of passengers (e.g., a value of 900 means 900,000 passengers).
Metrics:
total: Total passengers in the month
mdu: Average on business days (Media dos Dias Uteis)
msa: Average on Saturdays (Media dos Sabados)
mdo: Average on Sundays (Media dos Domingos)
max: Daily maximum (Maxima Diaria)
Companhia do Metropolitano de Sao Paulo (METRO). https://transparencia.metrosp.com.br/dataset/demanda
Monthly count of passengers transported by Sao Paulo metro, aggregated by metro line. Data covers October 2017 through 2025, sourced from the METRO SP transparency portal.
passengers_transportedpassengers_transported
A data frame with the following columns:
First day of the month (Date).
Metro line number: 1, 2, 3, 5, 15, or 99 for network total (integer).
Abbreviated metric code (character).
Passenger count in thousands (numeric).
Measurement type in Portuguese (character).
English name of the metro line (character).
Portuguese name of the metro line (character).
Calendar year (integer).
Lines 1, 2, 3, and 15 come from the METRO transparency portal (2017-2025). Line 5 (Lilas) is available October 2017 - December 2019 only. Line 4 (Amarela) is not available in this dataset (the Dataverse source does not include transported data for Lines 4/5). The network total (line_number = 99) may not be available for all years.
Values represent thousands of passengers (e.g., a value of 900 means 900,000 passengers).
Metrics:
total: Total passengers in the month
mdu: Average on business days (Media dos Dias Uteis)
msa: Average on Saturdays (Media dos Sabados)
mdo: Average on Sundays (Media dos Domingos)
max: Daily maximum (Maxima Diaria)
Companhia do Metropolitano de Sao Paulo (METRO). https://transparencia.metrosp.com.br/dataset/demanda
Monthly average of weekday (business day) passenger entries for each station in the Sao Paulo metro system. Data covers October 2017 through 2025, sourced from the METRO SP transparency portal.
station_averagesstation_averages
A data frame with the following columns:
First day of the month (Date).
Metro line number (integer).
Name of the metro station (character).
Average weekday passenger entries in thousands (numeric).
English name of the metro line (character).
Portuguese name of the metro line (character).
Calendar year (integer).
Only the weekday average (mdu) metric is available at the station level.
For line-level data with all 5 metrics, see passengers_entrance.
Station coverage varies by line:
Line 1 (Azul/Blue): 23 stations
Line 2 (Verde/Green): 14 stations
Line 3 (Vermelha/Red): 18 stations
Line 4 (Amarela/Yellow): available 2020-2025 (Insper Dataverse source)
Line 5 (Lilas/Lilac): October 2017 - December 2019 (METRO portal) and 2020-2025 (Insper Dataverse source)
Line 15 (Prata/Silver): 10 stations in 2020, 11 from 2021 onward
Companhia do Metropolitano de Sao Paulo (METRO). https://transparencia.metrosp.com.br/dataset/demanda
Daily passenger entries at each station in the Sao Paulo metro system. Data covers 2020 through 2025. Lines 1, 2, 3, and 15 come from the METRO SP transparency portal; Lines 4 and 5 come from the Insper Dataverse source.
station_dailystation_daily
A data frame with the following columns:
Date of observation (Date).
Metro line number: 1, 2, 3, 4, 5, or 15 (integer).
Full station name (character).
Daily passenger entries in thousands (numeric).
English name of the metro line (character).
Portuguese name of the metro line (character).
Three-letter station abbreviation used internally
by METRO (character). NA for Lines 4 and 5 (Dataverse source).
Calendar year (integer).
Values represent thousands of passengers (e.g., a value of 50 means 50,000 passengers entering the station that day).
Station coverage by line:
Line 1 (Azul/Blue): 23 stations
Line 2 (Verde/Green): 14 stations
Line 3 (Vermelha/Red): 18 stations
Line 4 (Amarela/Yellow): available 2020-2025 (Insper Dataverse);
station_code is NA
Line 5 (Lilas/Lilac): available 2020-2025 (Insper Dataverse);
station_code is NA
Line 15 (Prata/Silver): 10 stations in 2020, 11 from 2021 onward (Jardim Colonial added)
Some stations appear on multiple lines (e.g., Ana Rosa on Lines 1 and 2, Paraiso on Lines 1 and 2, Se on Lines 1 and 3). These are recorded separately for each line.
Companhia do Metropolitano de Sao Paulo (METRO). https://transparencia.metrosp.com.br/dataset/demanda
station_averages for monthly weekday averages,
passengers_entrance for monthly line-level totals.
Spatial point locations for Sao Paulo metro (METRO SP) and commuter train (CPTM) stations, including both currently operating stations and planned future stations.
stationsstations
An sf data frame with POINT geometry (CRS: WGS84 / EPSG:4326) and the following columns:
Station name in title case (character).
Line number the station belongs to (integer).
Portuguese color name of the line (character).
English color name of the line (character).
Operating company name (character).
Either "metro" (METRO SP) or "train" (CPTM)
(character).
Either "current" (operating) or "future"
(planned expansion) (character).
Station location (sfc_POINT).
Requires the sf package to work with spatial features. The distinction between types isn't always consistent, but we follow GeoSampa's classification. Broadly speaking, the "metro" runs undergrounds as a subway, and "train" runs above grounds as a commuter rail (although there are exceptions)
GeoSampa, Prefeitura de Sao Paulo. https://geosampa.prefeitura.sp.gov.br/
lines for line route geometries,
station_averages for passenger data by station.