Skip to contents

Returns an optionally updates the database with the endpoints of the GISCO API.

Usage

gisco_get_latest_db(update_cache = FALSE)

Arguments

update_cache

logical. On TRUE the local database would be rebuilt with the most updated information of the GISCO API.

Value

A tibble.

Details

The database in use is stored in the giscoR cache path, see gisco_set_cache_dir() for details. The cached database would be used in subsequent R sessions.

A static database gisco_db is shipped with the package. This database would be used in case there is any problem on update.

See also

Other database utils: gisco_db, gisco_get_metadata()

Examples


gisco_get_latest_db() |>
  dplyr::glimpse()
#> Rows: 9,609
#> Columns: 11
#> $ id_giscor    <chr> "coastal_lines", "coastal_lines", "coastal_lines", "coast…
#> $ year         <dbl> 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 200…
#> $ epsg         <dbl> 3035, 3035, 3035, 3035, 3035, 3035, 3035, 3035, 3035, 303…
#> $ resolution   <dbl> 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 10, 10, 10, 10, 10, 1…
#> $ spatialtype  <chr> "RG", "RG", "RG", "RG", "RG", "RG", "RG", "RG", "RG", "RG…
#> $ nuts_level   <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N
#> $ level        <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N
#> $ ext          <chr> "csv", "geojson", "gpkg", "json", "pbf", "shp", "csv", "g…
#> $ api_file     <chr> "csv/COAS_RG_01M_2006_3035.csv", "geojson/COAS_RG_01M_200…
#> $ api_entry    <chr> "https://gisco-services.ec.europa.eu/distribution/v2/coas…
#> $ last_updated <date> 2025-12-03, 2025-12-03, 2025-12-03, 2025-12-03, 2025-12-…