README.md

eurobarometer

Travis build
status Codecov test
coverage Project Status: Minimal or no implementation has been done yet, or
the repository is only intended to be a limited example, demo, or
proof-of-concept. license CRAN_Status_Badge DOI Follow
author Follow
contributor

The goal of eurobarometer is converting Eurobarometer microdata files, as stored by GESIS, into tidy R data frames and help common pre-processing problems. The more generic function for retrospecitve (ex post) survey harmonization can be found in the package retroharmonize.

Please report all issues to github.com/antaldaniel/eurobarometer/issues.

Pull requests are welcome on github.com/antaldaniel/eurobarometer from all potential contributors who abide by the terms of the Contributor Code of Conduct.

If you use eurobarometer in your work, please cite the package.

Installation

At this moment you cannot install yet the package from CRAN, but there is a development version on GitHub:

# install.packages("devtools")
devtools::install_github("antaldaniel/retroharmonize")
devtools::install_github("antaldaniel/eurobarometer")

You do not need to load the retroharmonize package with library(retroharmonize) but eurobarometer relies on some if its classes, methods and functions.

Data Preparation For Programmatic Use

The microdata of the European Commissions Eurobarometer surveys are stored and accessible in GESIS. They are not ready for programmatic use in R or for joining into longitudinal panels. We created this package to help this procedure following the principles of reproducible research.

  1. We import the GESIS SPSS files with the help of the adopted version of read_spss() from the haven package. The haven::write_sav() function does not work perfectly, it loses some metadata, so the best is to save you data as an .rds file. You can read surveys then with read_rds(). Both importing function will try to add important metadata to the retroharmonize::survey() tibble/data.frame class, including the original file name, the survey’s ID and DOI.

  2. We analyse the files with gesis_metadata_create() to understand what are the possible problems in the SPSS file and how to resolve them. (See: Working With Metadata or vignette("metadata")) This is a modified version of the more generic metadata_create function in retroharmonize. See the Working With Metadata vignette for some more details.

  3. We suggest various naming and harmonization changes in the data as a data processing step. These suggested changes can be modified by the user.

  4. We convert the variables to a modified version of the retroharmonize_labelled_spss_survey class that contains the harmonized values, harmonized labels, harmonized missing values codes of the variable with their history (original values, labels, and function applied to change them) for reproducibility. The labelled_spss_survey class inherits most of the functionality of the packages haven, labelled and are expected to work well with sjlabelled.

  5. The harmonization of the variable names is currently possible with retroharmonize only (See: Harmonize Value Labels). Further, Eurobarometer specific helpers will be added soon. See the article Survey Data Harmonization as a case study.

Workflow from 'Introduction to labelled by Joseph Larmaranged'

Workflow from ‘Introduction to labelled by Joseph Larmaranged’

Our approach follows Approach B to allow the conversion of harmonized and joined files back into SPSS.

Joining With Eurostat & Other Data Tables

Code of Conduct

Please note that the eurobarometer project is released with a Contributor Code of Conduct. By contributing to this project, you agree to its terms.

Disclaimer

The authors of this package are not affiliated with GESIS, or the producer of the Eurobarometer surveys, or the European Commission. For more information about the European Commission’s Eurobarometer history, visit the European Commission’s Public Opinion website.



antaldaniel/eurobarometer documentation built on Aug. 31, 2020, 10:57 p.m.