Package: spanishoddata 0.2.6

Egor Kotov

spanishoddata: Get Spanish Origin-Destination Data

Gain seamless access to origin-destination (OD) data from the Spanish Ministry of Transport, hosted at <https://www.transportes.gob.es/ministerio/proyectos-singulares/estudios-de-movilidad-con-big-data/opendata-movilidad>. This package simplifies the management of these large datasets by providing tools to download zone boundaries, handle associated origin-destination data, and process it efficiently with the 'duckdb' database interface. Local caching minimizes repeated downloads, streamlining workflows for researchers and analysts. Methods described in Kotov et al. (2026) <doi:10.1177/23998083251415040>. Extensive documentation is available at <https://ropenspain.github.io/spanishoddata/index.html>, offering guides on creating static and dynamic mobility flow visualizations and transforming large datasets into analysis-ready formats.

Authors:Egor Kotov [aut, cre], Robin Lovelace [aut], Eugeni Vidal-Tortosa [ctb]

spanishoddata_0.2.6.tar.gz
spanishoddata_0.2.6.zip(r-4.7)spanishoddata_0.2.6.zip(r-4.6)spanishoddata_0.2.6.zip(r-4.5)
spanishoddata_0.2.6.tgz(r-4.6-any)spanishoddata_0.2.6.tgz(r-4.5-any)
spanishoddata_0.2.6.tar.gz(r-4.7-any)spanishoddata_0.2.6.tar.gz(r-4.6-any)
spanishoddata_0.2.6.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
spanishoddata/json (API)

# Install 'spanishoddata' in R:
install.packages('spanishoddata', repos = c('https://ropenspain.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/ropenspain/spanishoddata/issues

Pkgdown/docs site:https://ropenspain.github.io

On CRAN:

Conda:

cdrdatadata-packagemobile-telephone-datamobilityorigin-destinationquarto

8.61 score 48 stars 42 scripts 672 downloads 15 exports 65 dependencies

Last updated from:a69048affb. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK186
source / vignettesOK246
linux-release-x86_64OK196
macos-release-arm64OK142
macos-oldrel-arm64OK162
windows-develOK135
windows-releaseOK156
windows-oldrelOK182
wasm-releaseOK162

Exports:spod_available_dataspod_check_filesspod_citespod_codebookspod_connectspod_convertspod_disconnectspod_downloadspod_getspod_get_data_dirspod_get_valid_datesspod_get_zonesspod_quick_get_odspod_quick_get_zonesspod_set_data_dir

Dependencies:askpassbackportsbase64encbitbit64cachemcheckmateclassclassIntclicliprcpp11crayoncurlDBIdigestdplyrduckdbe1071fastmapfsgenericsgluehmshttr2jsonliteKernSmoothlifecyclelubridatemagrittrMASSmemoiseopensslparallellypaws.commonpaws.storagepillarpkgconfigprettyunitsprogressproxypurrrR6rappdirsrbibutilsRcppRdpackreadrrlangs2sfstringistringrsystibbletidyselecttimechangetzdbunitsutf8vctrsvroomwithrwkxml2

Codebook and cookbook for v2 (2022 onwards) Spanish mobility data
1. Spatial data with zoning boundaries | 1.1 Districts | 1.2 Municipalities | 1.3 LUAs (Large Urban Areas) | 2. Mobility data | 2.1. Origin-destination data | 2.2. Population by trip count data | 2.3. Population by overnight stay data | Advanced use

Last update: 2026-03-23
Started: 2024-08-27

Codebook and cookbook for v1 (2020-2021) Spanish mobility data
1. Spatial data with zoning boundaries | 1.1 Districts | 1.2 Municipalities | 2. Mobility data | 2.1. Origin-Destination data | 2.2. Population by trip count data | Advanced use

Last update: 2026-02-24
Started: 2024-08-27

Download and convert mobility datasets
Introduction | Two ways to get the data | Analysing large datasets | How to choose between DuckDB, Parquet, and CSV | Analysis Speed | Convenience of data analysis | Scenarios of getting the data | Setup | Getting a single day with spod_get() | Analysing the data using DuckDB database | Convert to DuckDB | Load the converted DuckDB | Analysing the data using Parquet | Convert to Parquet | Load the converted Parquet | Download all available data | Download all data | Convert all data into analysis ready format | Conversion speed | Connecting to and analysing the converted datasets

Last update: 2026-02-24
Started: 2024-08-27

Quicky get daily data
Introduction | Setup | Get the data | Get all flows with at least 1000 trips | Get only trips of certain length | Get only trips between certain municipalities | All trips from Madrid | All trips from Madrid to Barcelona

Last update: 2026-02-24
Started: 2024-12-02