geoAr 1.2.0
Major Refactoring & Performance Improvements
-
Switched to
httr2for API Communication: All functions interacting with thegeoref-ar-api(includingget_endpoint, allpost_*_bulkfunctions, andget_geodata_dump) have been refactored to use thehttr2package instead ofhttr. This provides a more modern and flexible HTTP client interface. -
Asynchronous Parallel Batch Requests: The
post_*_bulkfunctions now leveragehttr2andpromisesto perform multiple batch requests to the API in parallel. This significantly improves performance when submitting a large number of queries (e.g., thousands of addresses for normalization) by:- Automatically splitting large query lists into smaller batches that respect the API’s limits (max 1000 queries per batch, sum of
maxparameters <= 5000 per batch). - Executing these batches concurrently.
- Automatically splitting large query lists into smaller batches that respect the API’s limits (max 1000 queries per batch, sum of
-
Enhanced Error Handling: Implemented more robust error handling for API requests using
httr2’s mechanisms, providing clearer error messages. -
Dependency Changes:
- Removed
httrfrom Imports. - Added
httr2 (>= 1.0.0)andpromises (>= 1.2.0)to Imports.
- Removed
geoAr 1.1.0
New Features
- Added a suite of
post_*_bulk()functions (post_provincias_bulk(),post_departamentos_bulk(),post_municipios_bulk(),post_localidades_bulk(),post_localidades_censales_bulk(),post_asentamientos_bulk(),post_calles_bulk(),post_direcciones_bulk(),post_ubicacion_bulk()) to allow for bulk queries to the correspondinggeoref-ar-apiendpoints using the POST method. This enables sending multiple queries in a single API request. - Each
post_*_bulk()function includes enhanced input validation for thequeries_listparameter, providing warnings for unrecognized parameter names within individual queries to guide correct usage. - Added
get_geodata_dump()function to download entire datasets (provincias, departamentos, etc.) in various formats (CSV, JSON, GeoJSON, NDJSON) directly from the API. - The
get_calles()function now exclusively handles GET requests; POST functionality for streets is managed bypost_calles_bulk().
Fixes & Improvements
- The base API URL used by
R/georefar.Rfunctions has been updated from HTTP to HTTPS (https://apis.datos.gob.ar/georef/api/) for secure communication. - Refactored the internal
post_endpoint()function to correctly construct JSON bodies for POST requests and parse API responses, especially for bulk operations. - Added comprehensive unit tests for input validation of all new
post_*_bulk()functions and basic validation forget_geodata_dump().
geoAr (development version) 0.0.1.5.0.0
- Fix #21 :
PKGNAMEtag
geoAr 0.0.1.4.3.1
- Changes
stopforwarninginget_endpoint()internal function forgeorefarfamily functions.
geoAr 0.0.1.4.3
Modify georefar get_* family functions:
- Add
TOKENworkflow alternative (documented) - Add new endpoints:
get_asentamientos&get_asentamientos
geoAr 0.0.1.4.2.1
Added georefar (R wrapper for georef-ar API) get_* family functions
geoAr 0.0.1.4
get_bahra() function for a new data source: Base de Asentamientos Humanos de la República Argentina (BAHRA)
geoAr 0.0.1.3.1
Added levels (envolvente, radios and entidades) & centroid (FALSE/TRUE) param to get_eph() function.
geoAr 0.0.1.3
Added new features
Geometry reconstruction for every CENSO (1869 - 2010). Example: Using
get_censo(censo = "1991", simplified = T).Permanent Household Survey (Encuesta Permanente de Hogares - EPH) Urban Aglomerations Geometries. Using
get_eph(geo = 'TUCUMAN', simplified = FALSE)for example.
geoAr 0.0.1.2
- Added census tract option as a parameter (CENSO 2010). Example
get_geo(geo = 'TUCUMAN', level = 'censal', simplified = FALSE)
geoAr 0.0.1.1
- Added a
NEWS.mdfile to track changes to the package. - Fix bug #1 in
get_geo("BUENOS AIRES")
