briatte/dsr

Surveys - Solidarity in Europe (SiE)

Ouverte

#38 ouverte le 21 mai 2023

 (0 commentaire) (0 réaction) (1 personne assignée)R (10 forks)github user discovery
datahelp wantedsurveys

Métriques du dépôt

Stars
 (48 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

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.

Guide contributeur