Skip to content
sodasciencePublic

About

Core Social Science Dataset

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Core social science dataset

Code to create the core social science dataset (CSSD) which captures different social domains in a single table per person-year.

cssd example table

Installation

Enter into your R console: remotes::install_github("username/repo") You may encounter the following dependencies in which case please install these as well.

  • arrow
  • dplyr
  • haven
  • magrittr
  • tidyr
  • tidyselect
  • yaml

Usage

  1. Call inject_yamls()
  2. Edit the yamls to get your preferred data (see configuration for more details)
  3. Call create_cssd()
  4. You can start analyzing the data

Configuration

For this it is important to understand how the files are strucutred starting with tablesconfig.yaml:

This yaml contains a list of all tables you want as part of your dataset. An entry looks as follows:

name does not need to match CBS names exactly but needs to be recognizable to you and must be aligned with the other config (more on that later).

path_sav contains all years and the relevant file for that dataset for that year. This function will merge all of these into one table but preserve a column with the respective year. You will need to change these paths definitely as these paths are not correct for the CBS remote environment as this code was not yet tested there.

cols contains all columns you want selected for the final dataset.

This is how it works for TAB files where the data is yearly by default, BUS tables have an additional feature.

startKey and endKey should match the names of the columns containing the event start and enddate. This eventdata is converted to yearly data.

path_sav still contains years but these are not taken into account. Put any year and then the correct path to the BUS file.

Note: You may add any table to this file or delete any table as long as it follows conventions it will work. The same goes for certain years or columns.

Contact

This is a project by the ODISSEI Social Data Science (SoDa) team. Do you have questions, suggestions, or remarks on the technical implementation? Create an issue in the issue tracker.

SoDa logo

About

Core Social Science Dataset

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages