diff --git a/NEWS.md b/NEWS.md index 40532dc6..f6fa01c1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,8 @@ - `gisco_get_education()` and `gisco_get_healthcare()` gains a new `year` argument: years available now are 2020 and 2023 versions of the dataset. +- `gisco_get_nuts()` and `gisco_get_countries()` now can download the 2024 + version of the datasets. # giscoR 0.5.1 diff --git a/data/gisco_db.rda b/data/gisco_db.rda index 22910165..9bfb9681 100644 Binary files a/data/gisco_db.rda and b/data/gisco_db.rda differ diff --git a/man/gisco_get.Rd b/man/gisco_get.Rd index 8481a6c5..d4f53ee0 100644 --- a/man/gisco_get.Rd +++ b/man/gisco_get.Rd @@ -22,7 +22,7 @@ gisco_get_countries( } \arguments{ \item{year}{Release year of the file. One -of \code{"2001"}, \code{"2006"}, \code{"2010"}, \code{"2013"}, \code{"2016"} or \code{"2020"}.} +of \code{"2001"}, \code{"2006"}, \code{"2010"}, \code{"2013"}, \code{"2016"}, \code{"2020"} or \code{"2024"}.} \item{epsg}{projection of the map: 4-digit \href{https://epsg.io/}{EPSG code}. One of: diff --git a/man/gisco_get_nuts.Rd b/man/gisco_get_nuts.Rd index 480553c1..7fbdc3ca 100644 --- a/man/gisco_get_nuts.Rd +++ b/man/gisco_get_nuts.Rd @@ -23,7 +23,7 @@ gisco_get_nuts( } \arguments{ \item{year}{Release year of the file. One -of \code{"2003"}, \code{"2006"}, \code{"2010"}, \code{"2013"}, \code{"2016"} or \code{"2021"}.} +of \code{"2003"}, \code{"2006"}, \code{"2010"}, \code{"2013"}, \code{"2016"}, \code{"2021"} or \code{"2024"}.} \item{epsg}{projection of the map: 4-digit \href{https://epsg.io/}{EPSG code}. One of: diff --git a/man/gisco_get_units.Rd b/man/gisco_get_units.Rd index 22396125..2f1ca97d 100644 --- a/man/gisco_get_units.Rd +++ b/man/gisco_get_units.Rd @@ -31,7 +31,7 @@ gisco_get_units( or \code{"df"}. See \strong{Value} and \strong{Details}.} \item{year}{Release year of the file. One -of \code{"2001"}, \code{"2006"}, \code{"2010"}, \code{"2013"}, \code{"2016"} or \code{"2020"}.} +of \code{"2001"}, \code{"2006"}, \code{"2010"}, \code{"2013"}, \code{"2016"}, \code{"2020"} or \code{"2024"}.} \item{epsg}{projection of the map: 4-digit \href{https://epsg.io/}{EPSG code}. One of: diff --git a/tests/testthat/test-gisco_get_countries.R b/tests/testthat/test-gisco_get_countries.R index d8a0a580..cdbe516b 100644 --- a/tests/testthat/test-gisco_get_countries.R +++ b/tests/testthat/test-gisco_get_countries.R @@ -44,6 +44,15 @@ test_that("Countries online", { cache = FALSE )) + expect_silent( + gisco_get_countries( + year = 2024, + spatialtype = "BN", + resolution = 60, + cache = TRUE + ) + ) + expect_silent(gisco_get_countries( spatialtype = "COASTL", country = c("ESP", "ITA") diff --git a/tests/testthat/test-gisco_get_nuts.R b/tests/testthat/test-gisco_get_nuts.R index dcd91294..c9afc99f 100644 --- a/tests/testthat/test-gisco_get_nuts.R +++ b/tests/testthat/test-gisco_get_nuts.R @@ -95,6 +95,14 @@ test_that("NUTS online", { expect_equal(epsg3035, sf::st_crs(a)) expect_equal(epsg3857, sf::st_crs(b)) expect_equal(epsg4326, sf::st_crs(c)) + + expect_silent(aa <- + gisco_get_nuts( + year = 2024, + resolution = "60", + nuts_level = "0", + nuts_id = "ES5" + )) }) diff --git a/vignettes/articles/nuts_codes.Rmd b/vignettes/articles/nuts_codes.Rmd index a2d621ca..c226ac80 100644 --- a/vignettes/articles/nuts_codes.Rmd +++ b/vignettes/articles/nuts_codes.Rmd @@ -12,17 +12,34 @@ knitr::opts_chunk$set( message = FALSE, out.width = "100%" ) + +library(giscoR) +library(reactable) ``` Annex with the [NUTS codes](https://ec.europa.eu/eurostat/web/nuts/overview) -(version **2021**, **2016** and **2013**) available in **giscoR**. +(version **2024**, **2021**, **2016** and **2013**) available in **giscoR**. + +## NUTS 2024 + +```{r nuts24, echo=FALSE} +df <- gisco_get_nuts(year = 2024, resolution = 60) +df <- sf::st_drop_geometry(df) +reactable(df, + elementId = "NUTS2024", + filterable = TRUE, + searchable = TRUE, + defaultColDef = colDef(minWidth = 120), + showPageSizeOptions = TRUE, + striped = TRUE, + paginationType = "jump", + defaultSorted = c("LEVL_CODE", "CNTR_CODE") +) +``` ## NUTS 2021 ```{r nuts21, echo=FALSE} -library(giscoR) -library(reactable) - df <- gisco_get_nuts(year = 2021, resolution = 60) df <- sf::st_drop_geometry(df) reactable(df,