Fixed missing hexagons at the edges of the H3 grid.
h3jsr::polygon_to_cells() only returns hexagons whose
centroid falls inside the municipality boundary, so border hexagons that
overlap the boundary without their center being inside were silently
excluded. build_h3_grid() now adds those hexagons by
checking the immediate neighbors of the grid against the municipality
boundary (#62).
cnefe_counts() and compute_lumi() now
expose a cache parameter (default TRUE),
consistent with tracts_to_h3() and
tracts_to_polygon() (#58).
New clear_cache_muni() function to delete cached
CNEFE ZIP files from the user cache directory, with optional filtering
by municipality code (#59).
New clear_cache_tracts() function to delete cached
census tract Parquet files, with optional filtering by state (UF) code
(#59).
skip_on_cran() fix
from v0.2.1 for the DuckDB spatial extension segfault on
r-devel-linux-x86_64-fedora-clang.skip_on_cran() to test-tracts_to_h3.R
to prevent a segfault on r-devel-linux-x86_64-fedora-clang caused by an
ABI mismatch between the clang-compiled DuckDB binary and GCC-built
spatial extension (duckdb/duckdb-r#1107).tracts_to_polygon() for dasymetric interpolation
from census tracts to user-supplied polygons, using CNEFE dwelling
points as ancillary data.tracts_variables_ref reference table mapping
cnefetools variable names to official IBGE census tract codes.hex_cnefe_counts() has been renamed to
cnefe_counts(). The function now accepts user-supplied
polygons via polygon_type = "user" in addition to H3
hexagons (polygon_type = "hex", default).compute_lumi() gains support for user-supplied polygons
via the same polygon_type parameter, and a new land-use mix
indicator: ICE (Index of Concentration at Extremes).tracts_to_h3() and tracts_to_polygon()
gain five new interpolation variables related to race:
race_branca, race_preta,
race_parda, race_amarela and
race_indigena.read_cnefe(), cnefe_counts(),
compute_lumi(), and tracts_to_h3() gain a
year argument (default 2022) to prepare for
future CNEFE editions.message()
calls.tracts_to_h3() and
tracts_to_polygon() with two-stage reporting
structure.cnefe_counts(), compute_lumi(), and
tracts_to_polygon() with DuckDB.tracts_to_h3() and
tracts_to_polygon().bal to the
compute_lumi() function.tracts_to_h3() for dasymetric interpolation from
tract aggregates to CNEFE dwelling points and H3 hexagons using DuckDB
(spatial + h3).backend = "r" when
backend = "duckdb" is requestedread_cnefe(output = "sf") by
handling missing coordinates before converting to sfCOD_ESPECIE documentation and removes
tidyselect deprecation warnings in tests and internalsbackend = "duckdb" (default) or backend = "r"
for hex_cnefe_counts() and compute_lumi()compute_lumi() to compute land-use mix indicators
(EI, HHI, adapted HHI, BGBI) on H3 grids.