An open API service indexing awesome lists of open source software.

https://github.com/helseprofil/norgeo

:package: R package to track changes for regional codes in Norway
https://github.com/helseprofil/norgeo

geo norway ssb

Last synced: 8 months ago
JSON representation

:package: R package to track changes for regional codes in Norway

Awesome Lists containing this project

README

          

---
output:
md_document:
variant: gfm
html_preview: false
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# norgeo

[![R build
status](https://github.com/helseprofil/norgeo/workflows/R-CMD-check/badge.svg)](https://github.com/helseprofil/norgeo/actions)
[![Codecov test coverage](https://img.shields.io/codecov/c/github/helseprofil/norgeo?logo=codecov)](https://app.codecov.io/gh/helseprofil/norgeo?branch=main)
[![](https://www.r-pkg.org/badges/version/norgeo?color=green)](https://cran.r-project.org/package=norgeo)
[![](https://img.shields.io/badge/lifecycle-stable-green.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![Download](https://cranlogs.r-pkg.org/badges/grand-total/norgeo)](https://cranlogs.r-pkg.org/badges/grand-total/norgeo)
[![GitHub R package version (branch)](https://img.shields.io/github/r-package/v/helseprofil/norgeo/master)](https://github.com/helseprofil/norgeo)

```{r echo=FALSE, results="hide", message=FALSE, eval = FALSE}
library("badger")
```

```{r, echo = FALSE, results='asis', eval=FALSE}
cat(
badge_github_actions(),
badge_codecov("helseprofil/norgeo"),
badge_cran_release("norgeo", "green"),
badge_lifecycle("maturing", "blue"),
badge_devel("helseprofil/norgeo", "blue")
)
```

## Intro

Regional granularity levels in Norway which are depicted by different codes,
have undergone several changes over the years. Identifying when codes have
changed and how many changes have taken place over several years can be
troublesome. This package will help to identify these changes and track when the
changes have taken place. The codes are based on those available from
[SSB](https://www.ssb.no).

## Installation

`norgeo` package can be installed directly from CRAN or via **GitHub** page of
[Helseprofil](https://github.com/helseprofil). To install from CRAN:

``` r
install.packages("norgeo")
```

If you want to install the development version then use `pak` package to
access to the **GitHub**. Running the codes below will install development
version of `norgeo`.

```{r dev, eval=FALSE}
if(!require(pak)) install.packages("pak")
pak::pkg_install("helseprofil/norgeo")
```

## Usage

The data is downloaded via API form SSB
[Klass](https://data.ssb.no/api/klass/v1/api-guide.html "ssb"). To learn how
to use the different functions in **norgeo**, please read the tutorial under
[Get Started](https://helseprofil.github.io/norgeo/articles/use-api.html)

## Output

Among the output produced by the function `track_change()` is as follows:

![output-result](man/figures/kommune_merge.png)

The data elucidate the complexity of all the codes change. For Larvik for
instance, the municipality has grown in 2020 with the inclusion of Lardal.
Therefore the code for Larvik has changed twice. How about Holmestrand? When
there are more than 350 municipalities with different code changes, then
tracking these can be a nightmare. The same with enumeration units ie.
*grunnkretser* with 14000 units!