options(gisco_timeout) using httr2::req_timeout(). The default value is httr2::req_timeout(..., seconds = 300) (5 minutes) (#123).testthat::local_mocked_bindings() for API error testing.?gisco_db.gisco_get_unit_urban_audit() and gisco_get_urban_audit() now default to the latest available year, 2024.This major release introduces a full overhaul of the codebase and test suite.
Requests now use httr2, and GeoPackage ("gpkg") is the preferred
download format when available. Cached files are reorganized into topic-based
subfolders for easier management.
Because of internal changes, existing caches are not compatible with this release and must be rebuilt.
Database management has also been improved. Instead of relying on the static
?gisco_db dataset, the package now stores the database in the cache. This
cached database is used for all API calls and can be updated via
gisco_get_cached_db(update_cache = TRUE). In practice, when GISCO publishes a
new release, you can access updated data by refreshing the cached database
without waiting for a new version of giscoR.
The package now uses tools::R_user_dir() instead of
rappdirs::user_config_dir() for managing the persistent cache directory. If
you already have a cache directory in place, you will see a one-time message
about this migration.
The package now requires R ≥ 4.1, and dependency updates improve both
performance and maintainability. All functions return tidy objects (tibbles or
sf objects with tibble data).
Dataset subsetting is now performed at read time using GDAL query capabilities
(sf::read_sf()), improving performance and reducing file size. The
geojsonsf dependency is no longer required.
Several new functions and arguments have been added, some functions have been renamed and one function has been deprecated. All bundled datasets have been updated to their latest versions.
We recommend reviewing the updated documentation at https://ropengov.github.io/giscoR/.
"gpkg") as the preferred download format.Note: Previous caches must be recreated.
sf::read_sf().gisco_get_cached_db() provides access to the cached internal database.gisco_get_census() provides access to census grid data.gisco_get_metadata() provides access to GISCO metadata.gisco_get_unit_country() provides access to country unit data and replaces the corresponding gisco_get_units() workflow.gisco_get_unit_nuts() provides access to NUTS unit data and replaces the corresponding gisco_get_units() workflow.gisco_get_unit_urban_audit() provides access to Urban Audit unit data and replaces the corresponding gisco_get_units() workflow.gisco_id_api_biogeo_region() provides access to the GISCO ID service API.gisco_id_api_census_grid() provides access to the GISCO ID service API.gisco_id_api_country() provides access to the GISCO ID service API.gisco_id_api_geonames() provides access to the GISCO ID service API.gisco_id_api_lau() provides access to the GISCO ID service API.gisco_id_api_nuts() provides access to the GISCO ID service API.gisco_id_api_river_basin() provides access to the GISCO ID service API.gisco_address_api() replaces gisco_addressapi(). The old name remains available as an alias.gisco_get_coastal_lines() replaces gisco_get_coastallines(). The old name remains available as an alias.gisco_get_postal_codes() replaces gisco_get_postalcodes(). The old name remains available as an alias.ext adds control over the file format ("gpkg", "shp" or "geojson").year defaults are updated to the latest release (#105).?gisco_coastal_lines is added and replaces gisco_coastallines.?gisco_countries_2024 is added and replaces gisco_countries.?gisco_db is updated to the newest data.?gisco_nuts_2024 is added and replaces gisco_nuts.The datasets
gisco_countries,gisco_nutsandgisco_coastallinesare no longer available. Any code that accessed them directly (for example,giscoR::gisco_countries) will now fail.Use the updated datasets or, preferably, retrieve them with the corresponding functions such as
gisco_get_countries()with default arguments.
gisco_bulk_download() renames the id_giscoR argument to id.gisco_get_communes() and gisco_get_lau() deprecate the cache argument in heavy-download functions.gisco_get_units() is deprecated. Equivalent functionality is now available through gisco_get_metadata() and the ?gisco_get_unit family.gisco_get_lau() fixes source filtering.gisco_get_countries() and gisco_get_nuts() add support for 2024 datasets (#93, @hannesaddec).gisco_get_education() and gisco_get_healthcare() add the year argument and support 2020 and 2023 data.?gisco_db.gisco_get_education() fixes API entry points.?gisco_addressapi adds support for the GISCO Address API.?gisco_db is updated.gisco_get_education() is added.gisco_get_lau() updates its default year to "2021".gisco_get_urban_audit() updates its default year to "2021".country and region arguments apply (#50, #75).tgs00026 dataset.gisco_get_nuts() adds the geo column (#62).NULL.gisco_detect_cache_dir() is added.gisco_get_healthcare() fixes URLs (#51).tgs00026 dataset.?gisco_db.gisco_get_airports() and gisco_get_ports() now always download fresh 2013 data.gisco_get_postalcodes() is added.cache = FALSE behavior.gisco_set_cache_dir(), persistent cache directories and gisco_clear_cache().?gisco_get documentation is refactored.?gisco_countrycode adds the eu field.verbose argument.?gisco_db.gisco_bulk_download() is added.gisco_check_access() is added.gisco_get_airports() is added.gisco_get_countries() and gisco_get_nuts() get faster downloads.gisco_get_grid() is added.gisco_get_ports() is added.gisco_get_units() is added.?gisco_get functions reorder arguments.tgs00026 dataset.