All Projects → expersso → gesis

expersso / gesis

Licence: other
R Client for GESIS Data Catalogue (DBK)

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to gesis

patzilla
PatZilla is a modular patent information research platform and data integration toolkit with a modern user interface and access to multiple data sources.
Stars: ✭ 71 (+373.33%)
Mutual labels:  research-data
reana
REANA: Reusable research data analysis platform
Stars: ✭ 86 (+473.33%)
Mutual labels:  research-data
affiliate-marketing-disclosures
Code and data belonging to our CSCW 2018 paper: "Endorsements on Social Media: An Empirical Study of Affiliate Marketing Disclosures on YouTube and Pinterest".
Stars: ✭ 22 (+46.67%)
Mutual labels:  research-data
events
Materials related to events I might attend, and to talks I am giving
Stars: ✭ 22 (+46.67%)
Mutual labels:  research-data
datascience
Keeping track of activities around research data
Stars: ✭ 29 (+93.33%)
Mutual labels:  research-data

Gesis

CRAN_Status_Badge

Introduction

The GESIS Data Catalogue offers a repository of approximately 5,000 datasets.

To install the package from github:

# install.packages("devtools")
devtools::install_github("expersso/gesis")
library(gesis)

A simple example

We start by listing all available groups of studies:

groups <- get_study_groups()
head(groups, 10)
##    group_no                                        value
## 1      0001 International Social Survey Programme (ISSP)
## 2      0002                     EB - Flash Eurobarometer
## 3      0003                               Travel Surveys
## 4      0004                            Time Budget Study
## 5      0005       EB - Central and Eastern Eurobarometer
## 6      0006       EB - Candidate Countries Eurobarometer
## 7      0007                                       ALLBUS
## 8      0008      EB - Standard and Special Eurobarometer
## 9      0009                  European Values Study (EVS)
## 10     0010                               Politbarometer

We see that the Eurobarometer has study group number 0008 Let's looks at all available Eurobarometer waves:

eurobars <- get_datasets("0008")
head(eurobars)
##    doi                           title
## 1 0078 Attitudes towards Europe (1962)
## 2 0626 European Communities Study 1970
## 3 0627 European Communities Study 1971
## 4 0628 European Communities Study 1973
## 5 0986  Eurobarometer 2 (Oct-Nov 1974)
## 6 0987      Eurobarometer 3 (May 1975)

We would now like to download the first three studies. We first need to log in to the Gesis website and then pass the DOIs (unique data set identifiers) to download_dataset:

# username and password stored as environment 
# variables "GESIS_USER" and "GESIS_PASS"
gesis_session <- login()
if(!dir.exists("downloads")) dir.create("downloads")
download_dataset(s = gesis_session, doi = eurobars$doi[1:3], 
                 path = "downloads", filetype = ".dta")
## Downloading DOI: 0078

## Downloading DOI: 0626

## Downloading DOI: 0627
(files <- list.files("downloads", full.names = TRUE))
## [1] "downloads/ZA0078_v1-0-1.dta" "downloads/ZA0626_v1-0-1.dta"
## [3] "downloads/ZA0627_v1-0-1.dta"

We can also download the codebooks for the same studies:

download_codebook(eurobars$doi[1:3], path = "downloads")
## Downloading codebook for DOI: 0078

## Downloading codebook for DOI: 0626

## Downloading codebook for DOI: 0627

Using the haven package we can now read the data sets:

library(haven)
df <- read_dta(files[1])
dim(df)
## [1] 4774  175

Disclaimer: the gesis package is neither affiliated with, nor endorsed by, the Leibniz Institute for the Social Sciences. I have been unable to find any indication that programmatic access to the website is disallowed under its terms of use (indeed, its guidelines appear to encourage it). That said, I would discourage users from using the gesis package to put undue pressure on their servers by initiating unnecessary (or unnecessarily large) batch downloads.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].