-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
93 lines (69 loc) · 2.93 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
output:
md_document:
variant: gfm
html_preview: false
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# orgdata <img src='man/figures/logo.png' align="right" width="110" height="138" />
<!-- badges: start -->
[![R-CMD-check](https://github.com/helseprofil/orgdata/workflows/R-CMD-check/badge.svg)](https://github.com/helseprofil/orgdata/actions)
[![Codecov test coverage](https://img.shields.io/codecov/c/github/helseprofil/orgdata?logo=codecov)](https://app.codecov.io/gh/helseprofil/orgdata?branch=main)
[![](https://img.shields.io/badge/lifecycle-stable-green.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![GitHub R package version (branch)](https://img.shields.io/github/r-package/v/helseprofil/orgdata/main)](https://github.com/helseprofil/orgdata)
[![GitHub R package version (branch)](https://img.shields.io/github/r-package/v/helseprofil/orgdata/dev)](https://github.com/helseprofil/orgdata)
<!-- badges: end -->
```{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)