Skip to content

Tags: ipea/geobr

Tags

python-v2.1.1

Toggle python-v2.1.1's commit message
add tests

v2.1.0

Toggle v2.1.0's commit message
R v2.1.0

python-v2.1.0

Toggle python-v2.1.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
new read_addresses() reader for CNEFE 2022, in R and Python (#453)

* new read_addresses() reader for CNEFE 2022, in R and Python

Reads the `cnefe_2022.parquet` asset of the geobr_prep_data v2.0.0 release:
IBGE's National Registry of Addresses for Statistical Purposes. Point data, so
no `simplified` argument, following read_municipal_seat() / read_schools().
No change was needed to the metadata sniffers -- the file name already parses
to geo = "cnefe", year = 2022, simplified = FALSE in both languages.

`code_muni` is required and has no default, unlike most readers. The data set
is a single 1.2 GB file with ~111 million rows, so downloading the whole
country has to be an explicit choice. read_statistical_grid() and
read_census_tract() set the precedent. In R the check runs up front via
cli_abort() rather than being left to lazy evaluation, which in
read_statistical_grid() only fires after the download; in Python a positional
argument with no default already raises at call time.

Python also registers the geography in `_GEO_LOADERS` and `POINT_GEOGRAPHIES`,
so it is reachable from query() and session(). Verified against the live
release that the set of geographies with no simplified asset still equals
POINT_GEOGRAPHIES once cnefe is added.

The Python network test is marked `@pytest.mark.network`, unlike the other
test_read_* modules, which are unmarked and do download in CI. At 1.2 GB across
3 OSs x 5 Python versions that is not reasonable; offline tests cover the
geography name, simplified=False, the required argument and the export.
`tests/samples/metadata_geobr_v2.parquet` gains the cnefe row, because the
autouse conftest fixture hides the live metadata from every test.

Verified: devtools::test(filter = 'read_addresses|list_geobr|download_metadata')
-> 25 pass, 0 fail. uv run pytest -m "not network" -> 286 pass. Both readers
were also exercised end to end against the real 1.2 GB file.

Also carries an unrelated change that arrived in the working tree during this
work: the removal of the internal check_connection() helper, its .Rd, its test,
its coverage line, and the now-unused curl::has_internet import.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* qgis fix v0.4.0

* Fix python's filter issue

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: camilagb <camilagdebrito@gmail.com>

python-v2.0.1

Toggle python-v2.0.1's commit message
python v2.0.1

python-v2.0.0

Toggle python-v2.0.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Merge pull request #451 from ipea/pythonfix

Pythonfix

python-v1.0.0

Toggle python-v1.0.0's commit message
fix python build

v2.0.1

Toggle v2.0.1's commit message
Merge branch 'master' of https://github.com/ipeaGIT/geobr

v2.0.0

Toggle v2.0.0's commit message
Merge branch 'master' of https://github.com/ipeaGIT/geobr

v1.9.1

Toggle v1.9.1's commit message
Merge branch 'master' of https://github.com/ipeaGIT/geobr

v1.9.0

Toggle v1.9.0's commit message
[R] new v1.9.0