Thanks for your interest in improving ibger! This document explains how to propose changes and what we expect from contributions.
- Bugs: please include a minimal reproducible example (consider
reprex), the output of
sessionInfo(), and — for API errors — the full URL shown in the error message. - Feature requests: describe the use case first; API design follows from it. Note that the public API mirrors the Python sibling package ibgepy, so changes to the function surface should make sense for both.
- Fork the repo and create a branch from
main. - Make your changes:
- Follow the existing code style (tidyverse-ish, native pipe
|>,clifor all messages/errors withcall = NULLoncli_abort()). - Public API is in English; internal helpers and IBGE API query
parameters stay in Portuguese (
periodo,localidades, ...). - Document with roxygen2 (markdown enabled) and run
devtools::document()— do not editman/*.RdorNAMESPACEby hand.
- Follow the existing code style (tidyverse-ish, native pipe
- Add tests. We use testthat (3e). HTTP interactions are tested against
recorded fixtures with httptest2 — see
tests/testthat/test-api.R. Please keep new fixtures small (trim large JSON payloads to the fields the test needs). - Run
devtools::test()anddevtools::check()locally; both must pass cleanly. - Update
NEWS.mdunder the development version heading.
- Requests go through
ibge_request()inR/utils.R(Aggregates API v3) oribge_metadados_request()inR/surveys.R(Metadata API v2). New endpoints should reuse these helpers. - Large-query splitting lives in
R/chunking.R. The IBGE API rejects requests above ~50,000 values in practice, so anything that changes query size estimation should keep that limit in mind.
This project is released with a Contributor Code of Conduct. By participating you agree to abide by its terms.