https://github.com/cimentadaj/digclass
An R package to translate social classes
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.8%) to scientific vocabulary
Last synced: 11 months ago
·
JSON representation
Repository
An R package to translate social classes
Basic Info
- Host: GitHub
- Owner: cimentadaj
- License: gpl-3.0
- Language: R
- Default Branch: main
- Homepage: https://cimentadaj.github.io/DIGCLASS/
- Size: 4.99 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
- Releases: 0
Created over 3 years ago
· Last pushed about 1 year ago
Metadata Files
Readme
Changelog
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# DIGCLASS
[](https://github.com/cimentadaj/DIGCLASS/actions/workflows/R-CMD-check.yaml)
The `DIGCLASS` R package aims to make translation between occupational social classes easy and comprehensive. It facilitates the translation of the International Standard Classification of Occupations (ISCO) from 1968, 1988 and 2008 to a wide range of social class schemes.
This package is a work in progress and has implemented currently these translations:
* **ISCO68**
- [X] ISCO68 to ISCO88
- [X] ISCO68 to ISCO08
- [X] ISCO68 to SIOPS
- [X] ISCO68 to ISEI
- [X] ISCO68 to EGP11/EGP7/EGP5/EGP3
- [X] ISCO68 to EGP11-MP
* **ISCO88**
- [X] ISCO88 to ISEI
- [X] ISCO88 to SIOPS
- [X] ISCO88 to IPICS
- [X] ISCO88 to MPS88
- [X] ISCO88 to EGP11/EGP7/EGP5
- [X] ISCO88 to EGP11-MP
- [X] ISCO88 to OESCH16/OESCH8/OESCH5
- [X] ISCO88 to ISCO88COM
- [X] ISCO88 to ISCO08
- [X] ISCO88 to ISCO68
- [X] ISCO88 to ORDC
- [X] ISCO88COM to ESEC - ISCO88COM must be 3 digits
- [X] ISCO88COM to ESEC-MP - ISCO88COM must be 3 digits
- [X] ISCO88COM to MSEC - ISCO88COM must be 3 digits
- [X] ISCO88COM to WRIGHT
- [X] ISCO88 to OEP (1-4 digits)
* **ISCO08**
- [X] ISCO08 to ISCO88
- [X] ISCO08 to ISEI
- [X] ISCO08 to SIOPS
- [X] ISCO08 to Microclasses
- [X] ISCO08 to IPICS
- [X] ISCO08 to OESCH16/OESCH8/OESCH5
- [X] ISCO08 to ESEC - ISCO08 must be 3 digits
- [X] ISCO08 to ESEC - ISCO08 must be 2 digits
- [X] ISCO08 to ESEC-MP - ISCO08 must be 3 digits
- [X] ISCO08 to MSEC - ISCO08 must be 3 digits
- [X] ISCO08 to ESEG - ISCO08 must be 2 digits
- [X] ISCO08 to OEP (1-4 digits)
* **ESCO**
- [X] ESCO to ISCO08
* **Extras**
- [X] Translation between major/submajor/minor/unit groups for ISCO68, ISCO88 and ISCO08
- [X] Repair ISCO variables
## Installation
You can install the development version of DIGCLASS from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("cimentadaj/DIGCLASS")
```
## Example
Here's an example of translating ISCO68 to ISEI and EGP class schemas:
```{r, message = FALSE, warning = FALSE}
library(DIGCLASS)
library(dplyr)
# Internal data for the European Social Survey round 6
# containing different ISCO variables
ess %>%
transmute(
isco68,
isei = isco68_to_isei(isco68),
egp = isco68_to_egp(isco68, self_employed, emplno),
egp_labels = isco68_to_egp(isco68, self_employed, emplno, label = TRUE)
)
```
The nomenclature of the function is `{origin}_to_{destination}` where `origin` is the origin class schema and `destination` is the destination class schema. The usual workflow is for you to type, for example `isco` and then hit `TAB` to get auto-completion on all possible translations.
For those class schemas that have labels, the `label` argument returns the labels instead of the class codes.
## Steps to add a new translation
1. Add two csv files respectively in `data-raw/social_classes/labels/` and `data-raw/social_classes/translation/` containing the labels and translation for the two schemas. When saving the csv file set `row.names = FALSE`.
2. Run the script `data-raw/social_classes.R` (with the root directory in `data-raw/`)
3. Add a new function inside `R/` with the convention `{origin}_to_{destination}()` where origin and destination are the class schemas we're translating. Please have a look at other translation to recycle common functions to do translations.
4. Add proper documentation to the function
## Other R packages
This package has benefitted greatly from other open source packages that already pave the way for translation between social class schemas. In particular, we've learned a lot and borrowed code from all of these packages:
- [ISCOGEN](https://github.com/benjann/iscogen): Stata package
- [SocialPosition](https://cran.r-project.org/web/packages/SocialPosition/index.html): R package
- [occupar](https://github.com/DiogoFerrari/occupar/): R package
## Funding
This project has been funded through the European Commission’s JRC Centre for Advanced Studies and the project Social Classes in the Digital Age (DIGCLASS): [https://joint-research-centre.ec.europa.eu/tools-and-laboratories/centre-advanced-studies/digclass_en](https://joint-research-centre.ec.europa.eu/tools-and-laboratories/centre-advanced-studies/digclass_en)
Owner
- Name: Jorge Cimentada
- Login: cimentadaj
- Kind: user
- Location: Madrid
- Company: Senior Data Scientist
- Website: https://cimentadaj.github.io/
- Repositories: 6
- Profile: https://github.com/cimentadaj
@ eDreams
GitHub Events
Total
- Issue comment event: 2
- Push event: 17
- Pull request event: 2
- Fork event: 1
Last Year
- Issue comment event: 2
- Push event: 17
- Pull request event: 2
- Fork event: 1
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Jorge Cimentada | c****j@g****m | 74 |
| SMALLENBROEK Oscar (JRC-ISPRA) | O****K@e****u | 3 |
| Jorge Cimentada | j****a@e****m | 2 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 1
- Total pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: 3 months
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 2.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: 3 months
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 2.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- cimentadaj (1)
Pull Request Authors
- OscarSmallenbroek (2)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml
actions
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION
cran
- R >= 2.10 depends
- cli * imports
- dplyr * imports
- magrittr * imports
- tibble * imports
- glue * suggests
- haven * suggests
- knitr * suggests
- readr * suggests
- rmarkdown * suggests
- testthat >= 3.0.0 suggests