Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/wfmackey/abscorr

This package has been superseded by runapp/strayr. Please see https://github.com/runapp-aus/strayr.
https://github.com/wfmackey/abscorr

australia correspondence data-science r

Last synced: 11 days ago
JSON representation

This package has been superseded by runapp/strayr. Please see https://github.com/runapp-aus/strayr.

Awesome Lists containing this project

README

        

---
output: github_document
---

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

data_path <- "man/data/egdata.csv"
```
# abscorr

`abscorr` is an R package that helps you deal with ABS correspondences.

**For the moment**, `abscorr` provides easy access to common ABS structures, like
the Australian and New Zealand Standard Classification of Occupations (ANZSCO)
and the Australian Standard Classification of Education (ASCED).

**In the future**, it will contain correspondence functions
(kind of like `absmapsdata::get_correspondence_absmaps`) for imperfect correspondence matching.

Installation and examples below.

I'll be adding commonly-used structures as I use them myself. If you'd like
to request one, let me know via a Github issue or email at [[email protected]](mailto:[email protected]).

## Installation

You can install the current version of `abscorr` from [GitHub](https://github.com/) with:

``` r
# install.packages("remotes")
remotes::install_github("wfmackey/abscorr")
```
## Example

```{r example, message=FALSE}
library(tidyverse)
library(abscorr)

glimpse(anzsco)

glimpse(asced_foe)

```

These tibbles can be tweaked and joined to your existing datasets. For example,
given a dataset of Australians by four-digit field of education and age group:

```{r}

data <- read_csv(data_path)

glimpse(data)

```

We can retrieve the four-digit fields and their corresponding two-digit fields
from `abscorr::asced_foe`:

```{r}
join_foe2 <- abscorr::asced_foe %>%
select(foe2, foe4) %>% # just keep the variables you want
distinct() # only keep unique observations

join_foe2

```

And join with our original dataset:

```{r}

data %>%
left_join(join_foe2)

```

Beaut.