Code
library(conflicted)
library(tidyverse)
conflicts_prefer(dplyr::filter, .quiet = TRUE)
library(knitr)
library(reactable)
Information on Party Facts ESS party IDs harmonization – see also sections “Linking data sets with Party Facts” and “ESS party data structure” in manuscript.
library(conflicted)
library(tidyverse)
conflicts_prefer(dplyr::filter, .quiet = TRUE)
library(knitr)
library(reactable)
<- read_csv("data-raw/pf-essprtv.csv")
pf_raw
<- pf_raw |> rename(cntry = ess_cntry) pf
Party Facts (PF) harmonizes ESS party IDs by creating a unique ESS party id (“first_ess_id”) for all ESS rounds. — see PF GitHub // essprtv
|>
pf mutate(prt_variable = str_extract(ess_variable, "[:alpha:]{4}")) |>
summarise(
n_ess_parties = n_distinct(ess_id),
n_harmonized = n_distinct(first_ess_id),
.by = prt_variable
)
prt_variable | n_ess_parties | n_harmonized |
---|---|---|
prtv | 3304 | 961 |
prtc | 2979 | 864 |
<-
tbl |>
pf summarise(
n_essrounds = n_distinct(essround),
n_ess_parties = n(),
n_harmonized = n_distinct(first_ess_id),
.by = cntry
|>
) arrange(cntry)
Number of ESS party IDs and harmonized IDs in ESS rounds by country (prtv and prtc)
if (knitr::is_html_output()) {
|> reactable(searchable = TRUE, striped = TRUE)
tbl else {
}
tbl }