# Create dataset for year 2022, with country name, year, and electoral dem
library(vdemlite)
vdem2022 <- fetchdem() %>%
mutate(region = e_regionpol_6C) %>%
mutate(region = case_match(region,
1 ~ "Eastern Europe",
2 ~ "Latin America",
3 ~ "Middle East",
4 ~ "Africa",
5 ~ "The West",
6 ~ "Asia")) %>%
filter(year == 2022) %>%
select(country_name, year, v2x_polyarchy, region, v2x_regime)