An Interface to IBGE's SIDRA API
Overview
Provides a flexible interface to discover, inspect, plan, and retrieve aggregate data from the Brazilian Institute of Geography and Statistics (IBGE) through its SIDRA application programming interfaces. SIDRA is IBGE's system for retrieving aggregate statistical data.
- Split relative or complete SIDRA values URLs with
sidra_split(), preserving parameter order. Period selectionsall,first,last, and ranges can be frozen to the official period inventory before downloading values. - Added opt-in period batching with
sidra_collect(batch_size = ...)and resumable local checkpoints withcheckpoint = .... Completed batches have checksums and original access times; mismatched settings, schema drift, corrupted files, and concurrent writers fail explicitly. No implicit disk cache or change toget_sidra()is introduced. info_sidra()can use official aggregate metadata and periods when the original descriptor returns a browser challenge. Its five legacy components are preserved; fields unavailable from the alternative source are disclosed instead of fabricated. Both-source failures retain the original error.
Show all changes in 0.6.0Hide the rest of the changes in 0.6.0
- Expanded offline compatibility tests across monthly, quarterly, annual, and multiple-classification synthetic fixtures, including special symbols, UTF-8, leading-zero identifiers, and comparison by keys rather than row order.
- Validate the complete alternative-response schema on every fallback path, including canonical queries at default precision. Reject out-of-selection codes and duplicate observation keys without altering identifiers or values. Missing explicitly requested members emit
sidrar_incomplete_warning; sparse tables are not forced into a complete Cartesian product. - Honor
Retry-Afteron HTTP 429 and 503 independently of quiet logging, including HTTP dates, while preserving the configured total attempt budget. The maximum accepted server-requested delay is configurable throughoptions(sidrar.retry_after_max = 120), with a default of 60 seconds. Longer delays return an informative error withretry_after_maxinstead of retrying prematurely or waiting indefinitely. - Broadened the official aggregate API fallback to multiple territorial levels, complete and first-period selections, period ranges, and SIDRA URLs with dimensions in different orders. Dimension columns follow the original URL; observation order remains that returned by the alternative service.
- Explicit decimal precision, including a single variable-specific
/d/vID Nselection, is accepted when numeric values already have the requested number of decimal places. Incompatible precision raisessidrar_fallback_precision_errorrather than silently rounding values or inventing unavailable digits. Maximum precision remains unsupported by the alternative route. - Automatic classification discovery can use official aggregate metadata when SIDRA's table descriptor returns a Cloudflare challenge.
- Recognized additional Cloudflare challenge pages containing a challenge title and the official challenge host, without requiring legacy HTML markers.
From NEWS.md in the release
Install
Health
- OK13 OK2026-09-30
- ERROR12 OK, 1 ERROR2026-09-16
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
Documentation signals are not tracked yet for this package.
Downloads
Repository
- PRs merged (all time)
- 25%
- Median days to close, 50 most recently updated closed issues
- 39
- Median days to close, 50 most recently updated closed PRs
- 74
7 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/rpradosiqueira/sidrar on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Show all practicesHide 1 practice
Dependencies
Installing sidrar adds 8 packages (6 with compiled code, 3.0 MB of source tarballs). Heaviest: openssl 1.1 MB, jsonlite 1.0 MB, curl 714 KB.
Code & Tests
People & History
- 0.6.0Latest
- 0.5.12026-08-26 · diff ↗
- 0.5.02026-08-26 · diff ↗ ·
added 11 exports
sidra_cache_clear, sidra_cache_info, sidra_catalog, sidra_collect, sidra_locations, sidra_metadata, sidra_periods, sidra_plan, sidra_provenance, sidra_query, sidra_split - 0.3.02026-07-23 · diff ↗
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 0.2.92022-07-13 · diff ↗
- 0.2.82022-06-03 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.2.72022-01-05 · diff ↗
- 0.2.62021-08-02 · diff ↗
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- 0.2.52020-01-27 · diff ↗
Package metadata
- First published
- 2017-04-23
- Total releases
- 13 / 9 yrs
- License
- GPL-3 OSI
- Download size
- 111 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("sidrar")This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.
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.