https://github.com/helseprofil/orgdata
:package: R package for aggregating original data mostly on enumeration areas level of granularity
https://github.com/helseprofil/orgdata
database ssb
Last synced: 7 months ago
JSON representation
:package: R package for aggregating original data mostly on enumeration areas level of granularity
- Host: GitHub
- URL: https://github.com/helseprofil/orgdata
- Owner: helseprofil
- License: other
- Created: 2021-07-20T12:41:16.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-28T14:14:17.000Z (about 1 year ago)
- Last Synced: 2024-05-29T06:01:16.921Z (about 1 year ago)
- Topics: database, ssb
- Language: R
- Homepage: https://helseprofil.github.io/orgdata/
- Size: 14.3 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - helseprofil/orgdata - :package: R package for aggregating original data mostly on enumeration areas level of granularity (R)
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%"
)
```# orgdata
[](https://github.com/helseprofil/orgdata/actions)
[](https://app.codecov.io/gh/helseprofil/orgdata?branch=main)
[](https://lifecycle.r-lib.org/articles/stages.html#stable)
[](https://github.com/helseprofil/orgdata)
[](https://github.com/helseprofil/orgdata)```{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/orgdata"),
badge_lifecycle("stable", "green"),
badge_github_version("helseprofil/orgdata", "blue")
)
```Cleaning, restructuring and aggregating **OR**i**G**inal **DATA** into a
preferred dataset.## Installation
The easiest way to install *orgdata* is to use the procedure decribed in the [manual](https://helseprofil.github.io/manual/start-install.html).
Update to new version or install the development version via `orgdata`.
```r
orgdata::update_khpackage("orgdata")# install development versjon
orgdata::update_khpackage("orgdata", branch = "dev")
```## Usage
To implement the specifications per file group as being registered in the
database can be done using `make_file()` function.```r
library(orgdata)
# All files under BEFOLKNING group
dt <- make_file("BEFOLKNING")# Select files with KOBLID
dt <- make_file("BEFOLKNING", koblid = 48)
dt <- make_file("BEFOLKNING", koblid = c(48, 72))# Select files without KOBLID
dt <- make_file("BEFOLKNING", select = 1) #select the first valid file
dt <- make_file("BEFOLKNING", select = "last") #select the most recent file
```Use function `make_filegroups()` to process multiple file groups at once.
```r
make_filegroups(BEFOLKNING, LESEFERD, NEET)
```## Resources
- [Config file](https://github.com/helseprofil/backend/blob/main/config/config-orgdata.yml)
- [Get started](https://helseprofil.github.io/orgdata/articles/get-started.html)
- [Functions overview](https://helseprofil.github.io/orgdata/reference/index.html)
- [General guide](https://helseprofil.github.io/manual/)
- [Conventions](https://helseprofil.github.io/orgdata/articles/standard.html)
- [Video guide](https://youtu.be/PhEQq4iWJCY)