Get Spanish Origin-Destination Data
Overview
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.
Bug fixes
- Improved Version 1 (2020-2021) metadata mapping to ensure redirected district files are correctly identified and added a check to alert the user if no data is found for the requested criteria.
From NEWS.md in the release
Install
Health
NOTER code for possible problemsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
Found calls to structure() using deprecated special names: spanishoddata/R/internal-utils.R (.Names: 1) '.Names' should be changed to 'names'.
- NOTE8 OK, 5 NOTE2026-09-30
- ERROR8 OK, 4 NOTE, 1 ERROR2026-09-04
- NOTE11 OK, 2 NOTE2026-07-16
- OK13 OK2026-05-24
- ERROR12 OK, 1 ERROR2026-05-17
Show 3 earlier changesHide 3 earlier changes
- OK13 OK2026-05-15
- ERROR12 OK, 1 ERROR2026-05-13
- OK14 OK2026-03-10
Documentation
- Help pages
- 65 (50 internal)includes a package overview page
- Examples that run
- 20%3 run in a plain check · 11 only when donttest examples are enabled (R CMD check --as-cran) · 1 never run
- Exported functions with examples
- 100%
- Documented parameters
- 94%
- Return-value docs
- 100%
- Help pages citing references
- 11% with a bibliography file
Downloads
Repository
- PRs merged (all time)
- 95%
- Median days to close, 50 most recently updated closed issues
- 14
- Median days to close, 50 most recently updated closed PRs
- 0
Forks over time
Issues over time
Commits over time
13 development-tooling and community-health practices detected across 8 families in the upstream repository
Checks run against github.com/ropenspain/spanishoddata on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-10-10 · The repository has a site deploy workflow
pkgdown site last built 2026-09-21
Show all practicesHide 4 practices
This repository shows signs of AI coding tools.
- GitHub Copilotfirst seen 2026-06-05Pull request: opened by its own accountCommits: 1 by its own account · at least 1 crediting it in the message
- Copilot code reviewCommits: at least 1 accepting its review suggestions
Dependencies
Code & Tests
Datasets
People & History
Package metadata
- First published
- 2024-12-18
- Total releases
- 9 / 2 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 2.5 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("spanishoddata")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.1177/23998083251415040.
The repository also keeps a CITATION.cff.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.