Skip to content

Commit

Permalink
fresh pkgdown, further links in readme, brackets in vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
AAoritz committed Feb 28, 2024
1 parent 8a1d3dd commit 764b0f4
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Changing administrative regional boundaries over time complicates the construction of consistent regional panel data. The `nuts` package can transform **European regional data** identified by **NUTS codes** between different **versions** and **subdivision levels** with the aim to harmonize and link data sets.

The package's main task is to convert data between all NUTS versions in use: 2006, 2010, 2013, 2016 and 2021. These conversions can be performed in any direction based on **spatial interpolation** using five different weights (regional area in square kilometers, 2011 and 2018 population size, 2012 and 2018 built-up area). The weights are based on conversion tables provided by the [Joint Research Center (JRC) of the European Commission (EC)](<https://urban.jrc.ec.europa.eu/nutsconverter/#/>) that are used in their online converter. The `nuts` package permits to do the same conversion offline with additional advantages such as the conversion within groups, enabling the conversion of datasets with multiple NUTS versions efficiently.
The package's main task is to convert data between all NUTS versions in use: 2006, 2010, 2013, 2016 and 2021. These conversions can be performed in any direction based on **spatial interpolation** using five different weights (regional area in square kilometers, 2011 and 2018 population size, 2012 and 2018 built-up area). The weights are based on conversion tables provided by the [Joint Research Center (JRC) of the European Commission (EC)](https://urban.jrc.ec.europa.eu/tools/nuts-converter) that are used in their online converter. The `nuts` package permits to do the same conversion offline with additional advantages such as the conversion within groups, enabling the conversion of datasets with multiple NUTS versions efficiently.

### Installation

Expand Down
8 changes: 6 additions & 2 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ template:
home:
title: Convert European Regional Data in R
reference:
- title: Functions
- title: Workhorse Functions
desc: Functions that classify and convert regional data
- contents:
starts_with("nuts_classify|nuts_aggregate|nuts_convert|nuts_test_multiple_versions|nuts_get_data|nuts_get_version|nuts_get_missing")
starts_with("nuts_classify|nuts_aggregate|nuts_convert")
- title: Additional Functions
desc: Helper functions to classify and convert regional data
- contents:
starts_with("nuts_test_multiple_versions|nuts_get_data|nuts_get_version|nuts_get_missing")
- title: Data
desc: Data sets required for conversion and examples
- contents:
Expand Down
11 changes: 8 additions & 3 deletions docs/index.html

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

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pkgdown: 2.0.7
pkgdown_sha: ~
articles:
nuts: nuts.html
last_built: 2024-02-20T21:42Z
last_built: 2024-02-28T07:40Z
urls:
reference: https://aaoritz.github.io/nuts/reference
article: https://aaoritz.github.io/nuts/articles
Expand Down
43 changes: 37 additions & 6 deletions docs/reference/index.html

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

21 changes: 21 additions & 0 deletions docs/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,27 @@
<url>
<loc>https://aaoritz.github.io/nuts/reference/nuts-package.html</loc>
</url>
<url>
<loc>https://aaoritz.github.io/nuts/reference/nuts_aggregate.html</loc>
</url>
<url>
<loc>https://aaoritz.github.io/nuts/reference/nuts_classify.html</loc>
</url>
<url>
<loc>https://aaoritz.github.io/nuts/reference/nuts_convert_version.html</loc>
</url>
<url>
<loc>https://aaoritz.github.io/nuts/reference/nuts_get_data.html</loc>
</url>
<url>
<loc>https://aaoritz.github.io/nuts/reference/nuts_get_missing.html</loc>
</url>
<url>
<loc>https://aaoritz.github.io/nuts/reference/nuts_get_version.html</loc>
</url>
<url>
<loc>https://aaoritz.github.io/nuts/reference/nuts_test_multiple_versions.html</loc>
</url>
<url>
<loc>https://aaoritz.github.io/nuts/reference/patents.html</loc>
</url>
Expand Down
2 changes: 1 addition & 1 deletion vignettes/nuts.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ gg_pop_flows

To illustrate the main idea, the map below showcases **population densities** across NUTS-2 regions. As population is not uniformly distributed across space, weighting regions dependent on their area size comes with strong assumptions. For instance, region `NO01` in version 2016, that contains the city of Oslo, makes a relatively modest geographical contribution to the new region `NO08`, but significantly bolsters the population of the latter. Assuming that the variable to be converted is correlated with population across space, the conversion can thus be refined using population weights to account for flows between different versions.

```{r, echo=FALSE, message = FALSE, warning = FALSE, out.width = "100%", fig.width = 7, fig.cap= "Spatial distribution of population and boundary changes; Sources: [Shapefiles](https://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/administrative-units-statistical-units/nuts) and [population raster](https://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/population-distribution-demography/geostat) from EUROSTAT; Created using the [sf](https://r-spatial.github.io/sf/) and the [terra](https://rspatial.github.io/terra/reference/terra-package.html) packages."", fig.alt ="Two maps of Southern Norway with very granular population density and administrative boundaries of the 2016 and 2021 NUTS version. The region with the capital Olso and its adjacent region are highlighted in version 2016 that both contribute to a larger single region in version 2021."}
```{r, echo=FALSE, message = FALSE, warning = FALSE, out.width = "100%", fig.width = 7, fig.cap= "Spatial distribution of population and boundary changes; Sources: [Shapefiles](https://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/administrative-units-statistical-units/nuts) and [population raster](https://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/population-distribution-demography/geostat) from EUROSTAT; Created using the [sf](https://r-spatial.github.io/sf/) and the [terra](https://rspatial.github.io/terra/reference/terra-package.html) packages.", fig.alt ="Two maps of Southern Norway with very granular population density and administrative boundaries of the 2016 and 2021 NUTS version. The region with the capital Olso and its adjacent region are highlighted in version 2016 that both contribute to a larger single region in version 2021."}
pop <- raster("JRC_1K_POP_2018.tif")
no_2016_1 <- no_2016 %>% st_transform(crs(pop))
Expand Down

0 comments on commit 764b0f4

Please sign in to comment.