Skip to content

Commit

Permalink
Update countries and nuts
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Aug 1, 2024
1 parent dfb1285 commit 0988fa5
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 7 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file modified data/gisco_db.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion man/gisco_get.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/gisco_get_nuts.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/gisco_get_units.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions tests/testthat/test-gisco_get_countries.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
8 changes: 8 additions & 0 deletions tests/testthat/test-gisco_get_nuts.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"
))
})


Expand Down
25 changes: 21 additions & 4 deletions vignettes/articles/nuts_codes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0988fa5

Please sign in to comment.