Skip to content

[Feature request] Allow to cache by country #112

@ColinFay

Description

@ColinFay

Expected behavior

Running gisco_get_nuts(country = "Belgium") then gisco_get_nuts(country = "Austria") caches both, not only the latest.

Observed behavior

The package only caches the latest value.

> tp_dir <- fs::path_temp("gisco_cache")
> fs::dir_create(tp_dir)
> gisco_get_nuts(
    year = "2024",
  nuts_level = 2,
  epsg = "3035",
  resolution = "60",
  country = "Austria",
  cache = TRUE,
  cache_dir = tp_dir
)
> fs::dir_ls(tp_dir)
/var/folders/9w/zdlv83ws6csdjnfc5x819gtr0000gn/T/Rtmp8GVGgl/gisco_cache/NUTS_RG_60M_2024_3035_LEVL_2.geojson

> gisco_get_nuts(
  year = "2024",
  nuts_level = 2,
  epsg = "3035",
  resolution = "60",
  country = "France",
  cache = TRUE,
  cache_dir = tp_dir
)
> fs::dir_ls(tp_dir)
/var/folders/9w/zdlv83ws6csdjnfc5x819gtr0000gn/T/Rtmp8GVGgl/gisco_cache/NUTS_RG_60M_2024_3035_LEVL_2.geojson

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions