briatte/dsr

Surveys - Solidarity in Europe (SiE)

Open

#38 aberto em 21 de mai. de 2023

Ver no GitHub
 (0 comments) (0 reactions) (1 assignee)R (10 forks)github user discovery
datahelp wantedsurveys

Métricas do repositório

Stars
 (48 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

https://twitter.com/alexandreafonso/status/1658451225174753280

https://europeangovernanceandpolitics.eui.eu/eui-yougov-solidarity-in-europe-project/ https://cadmus.eui.eu/handle/1814/72778

d <- "2020 SiE year dataset/2020 SiE dataset_dataset.csv" %>%
  readr::read_csv()

count(d, qcountry)
cty <- c("United Kingdom" ,"Denmark" ,"Finland" ,"France" ,"Germany" ,"Sweden" ,"Greece" ,"Hungary" ,"Italy" ,"Lithuania" ,"Netherlands" ,"Poland" ,"Romania" ,"Spain")
d$qcountry <- factor(d$qcountry, labels = cty)

summary(d$weight)

str_subset(names(d), "q20")
d <- mutate_at(d, vars(starts_with("q20")), ~ case_when(.x == 1 ~ 1L, .x == 2 ~ 0L, .x == 3 ~ NA_integer_))

# Austria
count(d, qcountry, q20_1)
tapply(d$q20_1, d$qcountry, mean, na.rm = TRUE)

# TODO: survey weights
# TODO: make dyadic version

Possibly present as a ‘freestyle’ exercise -- here's the data, do whatever you like with it. In this case, provide the data as a truly dyadic dataset, with q20_x merged into a single item, and additional columns corresponding to the model in the paper.

Guia do colaborador