2  Data Sources

2.1 Primary Data Sources

Table 2.1: Primary data sources used in the IMPT pipeline
Code Dataset Reference period Source
CAOP CAOP 2024.1 — Administrative Boundaries 2024 https://www.dgterritorio.gov.pt/sites/default/files/ficheiros-cartografia/CAOP_Continente_2024.1-gpkg.zip
BGRI21 Census 2021 — Base Geográfica de Referenciação de Informação 2021 https://mapas.ine.pt/download/filesGPG/2021/nuts3/BGRI21_170.zip
IMOB IMOB 2017/18 — Inquérito à Mobilidade nas Áreas Metropolitanas 2018 https://www.ine.pt/xurl/pub/349495406
GTFS GTFS — General Transit Feed Specification (all AML operators) 2026-02 Multiple operators — see GTFS Operators
OSM-RN OpenStreetMap (OSM) — Road network 2026-01 https://export.hotosm.org/exports/4782f0b8-6778-4c0e-8e4f-97fc62e7f240
OSM-POI OpenStreetMap (OSM) — POIs 2024-04 https://export.hotosm.org / https://github.com/U-Shift/SiteSelection/releases/download/0.1/osm_poi_landuse.gpkg
CM Carris Metropolitana — Health centres and schools datasets 2025 https://github.com/carrismetropolitana/datasets
ANSR ANSR — Road accident data (Sinistralidade Rodoviária) 2019–2023 https://pmmus.tmlmobilidade.pt/
INE-Inc INE — Household income by parish (Rendimento agregado 2023) 2023 https://www.ine.pt/xurl/pub/66303599
INE-Hous INE — Housing costs by parish (Habitação custos 2021) 2021 https://www.ine.pt/xurl/pub/65586079
GBA Global Building Atlas - Building heights 2026 https://github.com/zhu-xlab/GlobalBuildingAtlas
PMUS TML PMUS - Shared mobility docks 2025 https://pmmus.tmlmobilidade.pt/
COS COS 2023 v1 — Land use Map 2023 https://geo2.dgterritorio.gov.pt/cos/S2/COS2023/COS2023v1-S2-gpkg.zip
IP Infraestruturas de Portugal — Toll cost 2026 https://portagens.infraestruturasdeportugal.pt

2.2 GTFS Transit Operators

Travel time matrices for public transit and stop-level frequency statistics were computed using GTFS feeds downloaded on 04/02/2026 from the following operators:

Table 2.2: GTFS feeds used in the IMPT pipeline
Operator Mode GTFS URL
Carris Metropolitana Bus https://api.carrismetropolitana.pt/gtfs
Carris Municipal (Lisboa) Bus https://gateway.carris.pt/gateway/gtfs/api/v2.8/GTFS
MobiCascais Bus https://drive.google.com/u/0/uc?id=13ucYiAJRtu-gXsLa02qKJrGOgDjbnUWX&export=download
Transportes Coletivos do Barreiro (TCB) Bus https://backend.tcbarreiro.pt/download-gtfs
Metropolitano de Lisboa (Metro) Metro https://metrolisboa.pt/google_transit/googleTransit.zip
Comboios de Portugal (CP) Rail https://publico.cp.pt/gtfs/gtfs.zip
Fertagus Rail https://mts.pt/imt/MTS-20240129.zip
Metro Transportes do Sul (MTS) Light Rail https://fertagus.pt/GTFSTMLzip/Fertagus_GTFS.zip
Transtejo/Soflusa (TTSL) Ferry https://api.transtejo.pt/files/GTFS.zip

2.3 R Packages

The following R packages are used across the pipeline:

Table 2.3: Key R packages used in the IMPT pipeline
Package Primary purpose in IMPT CRAN?
Data reading
readr Fast CSV reading/writing Yes
readxl Excel file reading (INE data) Yes
openxlsx Excel file reading (safety data) Yes
lubridate Date/time manipulation Yes
Data manipulation
dplyr Data manipulation Yes
tidyr Data reshaping Yes
stringr String manipulation Yes
tidyverse Collection of data science packages Yes
Geo spatial data
sf Spatial data handling (read, write, join, transform) Yes
terra DEM raster data processing Yes
mapview Interactive map visualisation Yes
stplanr OD line-to-point conversion Yes
h3jsr H3 hexagonal grid generation No*
Routing and accessibility
r5r Multimodal travel time matrix computation Yes
accessibility Cumulative accessibility and cost-to-closest measures Yes
odjitter Origin-Destination jittering No*
tidytransit GTFS feed processing and stop frequencies Yes
GTFShift GTFS loading, route frequency, filtering No*
PCA
FactoMineR Principal Component Analysis Yes
Tests
assertthat Runtime assertion checks Yes
Piggyback
piggyback GitHub release asset upload/download Yes

* Installed from GitHub: odjitter (itsleeds/odjitter, R subdirectory), GTFShift (U-Shift/GTFShift), h3jsr (obrl-soil/h3jsr).