Data from the 'Access to Opportunities Project (AOP)'
Overview
Download data from the 'Access to Opportunities Project (AOP)'. The 'aopdata' package brings annual estimates of access to employment, health, education and social assistance services by transport mode, as well as data on the spatial distribution of population, jobs, health care, schools and social assistance facilities at a fine spatial resolution for all cities included in the project. More info on the 'AOP' website https://www.ipea.gov.br/acessooportunidades/en/.
**Major changes**
- Data files are now downloaded with {httr2}. If a file can't be downloaded from the Ipea server, that file is downloaded from the GitHub mirror, so a single unavailable file or server no longer makes the whole request fail. When several files are downloaded at once, the progress bar counts files; when only one file is downloaded, it shows the amount of data downloaded.
- aopdata now requires R >= 4.1.0 (a requirement of {httr2}).
**Bug fixes**
- HTTP errors (e.g. 404 pages) are no longer saved and read as data.
- Interrupted or corrupted downloads are no longer reused from the session cache: files are saved only once they are complete, and a cached file that can't be read is removed.
- Downloads that stall are now stopped instead of hanging the R session.
- The metadata file is now downloaded with the same downloader as the data files (GitHub release first, Ipea server as fallback), and cached only once it has been read successfully. A broken cached metadata file is downloaded again instead of making every later call in the session fail.
- Grids (
geometry = TRUEorread_grid()) of several cities now have a bounding box that covers all the cities, and are a plainsfdata frame. Previously the bounding box covered only the first city, so maps of several cities could be cropped. - When a download fails, the user now sees one message that says what failed. Previously the functions could print "No internet connection." up to three times, even when only one file was unavailable.
**Minor changes**
- Documentation corrected to match the data: the years and cities of each transport mode, the off-peak window, time thresholds, the TMI indicators, the defaults of
read_population(year)andread_grid(showProgress), and return types.
Show all changes in 1.2.0Hide the rest of the changes in 1.2.0
- Typos fixed in the documentation and vignettes; the package citation (
citation("aopdata")) now lists the two Ipea discussion papers as technical reports, with their DOIs. - City codes and names can now be mixed, in any capitalisation and with or without accents, in every function (e.g.
city = c('nat', 'São Paulo')). Previously a mix returnedNULLor a misleading error, and onlyread_access()accepted upper-case city codes and'ALL'. - Invalid inputs now give a clear error before any data is downloaded:
citymissing,NULL,NAor not text; an unknown city (the error names it and lists the valid codes and names); and amodethat a requested city doesn't have (the error names the city and lists the cities with that mode). peak,geometryandshowProgressmust be a singleTRUEorFALSE.showProgress = 1/0is no longer accepted, andNAor vectors give an error instead of a base R error. A vectoryearalso gives a clear error; one year per call is supported.- Which cities have public transport is now taken from the metadata instead of lists hard-coded in
read_access(). aopdata_dictionary()now only acceptslang = "en"or"pt"; values such as"english"were accepted before and silently did nothing.- All messages and errors now use {cli}. Errors have the condition class
aopdata_error, and messages about failed downloads have the classaopdata_network, so they can be caught withtryCatch()orwithCallingHandlers(). Download failure messages are nowrlang_messages (previouslycliMessage). The wording of the errors for invalid arguments,modeandshowProgresschanged, so match on the condition class rather than on the message text. - The "Downloading ... data" messages are now only shown when
showProgress = TRUE. The "Using mode" message was removed.
From NEWS.md in the release
Install
Health
- OK13 OK2026-09-08
- ERROR12 OK, 1 ERROR2026-09-07
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 22 (17 internal)includes a package overview page
- Examples that run
- 83%5 run in a plain check (5 of them under a condition) · 1 never run
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 2
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
- github.com/ipeagit/aopdata · last recorded on 2026-10-18
5 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/ipea/aopdata on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-10-19 · The repository has a site deploy workflow
pkgdown site last built 2026-10-19
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-10-18Seen in the repository: .claude, CLAUDE.mdNamed in .gitignore: .claude
Dependencies
Installing aopdata adds 25 packages (20 with compiled code, 28 MB of source tarballs). Heaviest: sf 9.3 MB, data.table 5.7 MB, s2 2.8 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 1.2.0Latest2026-10-19 · current release · diff ↗ ·
listed once in CRAN's queue
Seen in one reading of CRAN's incoming queue, at 2026-10-19 05:32 UTC, so it stayed less than the time between readings. - RR 4.6.0 released · 2026-04-24
- 1.1.22026-01-09 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 1.1.12025-01-29 · diff ↗
- 1.1.02024-08-28 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 1.0.32023-08-31 · diff ↗
- 1.0.22023-05-19 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 1.0.12022-08-31 · diff ↗
- unarchivedReturned to CRAN2022-08-12
- 1.0.02022-08-12 · diff ↗ ·
removed 10 exports
aop_merge, aop_spatial_join, check_connection, download_data, download_metadata, load_data, select_city_input, select_metadata, select_mode_input, select_year_inputadded 1 export
aopdata_dictionary - RR 4.2.0 released · 2022-04-22
- archivedRemoved from CRAN2022-02-06repeated policy violation On Internet access
- 0.2.32022-01-28 · diff ↗
Package metadata
- First published
- 2021-03-08
- Total releases
- 13 / 5 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 374 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("aopdata")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.38116/td2800, 10.38116/td2772.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.