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.
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.
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.
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.
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.
We suggest various naming and harmonization changes in the data as a data processing step. These suggested changes can be modified by the user.
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.
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’
Our approach follows Approach B
to allow the conversion of harmonized
and joined files back into SPSS.
The regional boundaries are consistently used, coded and named - this will be harmonized with the package regions, which helps resolving common issues, and to properly join various Eurobarometer files with Eurostat data tables and Google data tables.
This will also allow you to create regional statistics from Eurobarometer microdata files.
Please note that the eurobarometer
project is released with a
Contributor Code of
Conduct.
By contributing to this project, you agree to its terms.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.