3  Party Facts harmonization

Information on Party Facts ESS party IDs harmonization – see also sections “Linking data sets with Party Facts” and “ESS party data structure” in manuscript.

Code
library(conflicted)

library(tidyverse)
conflicts_prefer(dplyr::filter, .quiet = TRUE)

library(knitr)
library(reactable)
Code
pf_raw <- read_csv("data-raw/pf-essprtv.csv")

pf <- pf_raw |> rename(cntry = ess_cntry)

3.1 ESS party IDs

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

Code
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

3.2 Parties per country

Code
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)

Code
if (knitr::is_html_output()) {
  tbl |> reactable(searchable = TRUE, striped = TRUE)
} else {
  tbl
}