├── .Rbuildignore ├── .gitignore ├── DESCRIPTION ├── NAMESPACE ├── R ├── data.R ├── fill_vars.R ├── plot_indicator.R └── var_info.R ├── README.md ├── data ├── codebook.RData ├── vdem.RData └── vparty.RData ├── inst ├── CITATION └── Updating.R ├── man ├── codebook.Rd ├── fill_vars.Rd ├── find_var.Rd ├── plot_indicator.Rd ├── var_info.Rd ├── vdem.Rd └── vparty.Rd └── vdemdata.Rproj /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^.*\.Rproj$ 2 | ^\.Rproj\.user$ 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | .Ruserdata 5 | .README.html 6 | .README.Rmd 7 | .Rproj 8 | 9 | src/*.o 10 | src/*.so 11 | 12 | /**/.DS_Store 13 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: vdemdata 2 | Type: Package 3 | Title: Provides most recent V-Dem and V-Party data and some additional features 4 | Version: 15.0 5 | Authors@R: c(person("Seraphine", "Maerz", email = "maerz@soz.uni-frankfurt.de", role = c("aut", "cre")), 6 | person("Amanda", "Edgell", email = "amanda.edgell@v-dem.net", role = c("aut")), 7 | person("Sebastian", "Hellmeier", email = "sebastian.hellmeier@v-dem.net", role = c("aut")), 8 | person("Nina", "Ilchenko", email = "nina.ilchenko@v-dem.net", role = c("aut")), 9 | person("Linnea", "Fox", email = "linnea.fox@v-dem.net", role = c("aut"))) 10 | Maintainer: Linnea Fox 11 | Description: This package contains the most recent full V-Dem data set 12 | plus external variables (see here: 13 | https://www.v-dem.net/data/the-v-dem-dataset/), 14 | the V-Party data set (https://www.v-dem.net/data/v-party-dataset/), and 15 | offers some additional functions to work with vdem data. 16 | Depends: R (>= 3.5.0) 17 | Imports: 18 | dplyr, 19 | tidyr, 20 | stringr, 21 | ggplot2, 22 | tidyselect 23 | License: GPL-3 24 | Encoding: UTF-8 25 | LazyData: true 26 | RoxygenNote: 7.2.3 27 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2: do not edit by hand 2 | 3 | export(fill_vars) 4 | export(find_var) 5 | export(plot_indicator) 6 | export(var_info) 7 | import(dplyr) 8 | import(ggplot2) 9 | import(tidyr) 10 | import(tidyselect) 11 | -------------------------------------------------------------------------------- /R/data.R: -------------------------------------------------------------------------------- 1 | NULL 2 | 3 | #' V-Dem data 4 | #' 5 | #' Loads the most recent version of the V-Dem dataset. 6 | #' 7 | #' Varieties of Democracy (V-Dem) is a new approach to conceptualizing 8 | #' and measuring democracy. We provide a multidimensional and disaggregated 9 | #' dataset that reflects the complexity of the concept of democracy as a 10 | #' system of rule that goes beyond the simple presence of elections. 11 | #' The V-Dem project distinguishes between five high-level principles of 12 | #' democracy: electoral, liberal, participatory, deliberative, and 13 | #' egalitarian, and collects data to measure these principles. 14 | #' With five Principal Investigators (PIs), thirty-nine Project Managers 15 | #' (PMs) with special responsibility for issue areas, 16 | #' more than thirty Regional Managers (RMs), 17 | #' 134 Country Coordinators (CCs), Research Assistants, 18 | #' and over 4,000 Country Experts (CEs). The V-Dem project is one 19 | #' of the largest social science data collection projects 20 | #' focusing on research. The Headquarters is based at the 21 | #' V-Dem Institute, the Department of Political Science at the 22 | #' University of Gothenburg, Sweden. The most recent data set (v15) 23 | #' covers 202 countries from 1789-2024 and includes 500+ indicators, 24 | #' 81 indices and 5 high-level indices. 25 | #' For more info see https://www.v-dem.net/ 26 | #' 27 | #' 28 | #' @format A data frame with 27913 observations and 4607 variables. 29 | #' 30 | #' @references Coppedge, Michael, John Gerring, Carl Henrik Knutsen, Staffan I. Lindberg, Jan Teorell, David Altman, Fabio Angiolillo, Michael Bernhard, Agnes Cornell, M. Steven Fish, Linnea Fox, Lisa Gastaldi, Haakon Gjerløw, Adam Glynn, Ana Good God, Sandra Grahn, Allen Hicken, Katrin Kinzelbach, Joshua Krusell, Kyle L. Marquardt, Kelly McMann, Valeriya Mechkova, Juraj Medzihorsky, Natalia Natsika, Anja Neundorf, Pamela Paxton, Daniel Pemstein, Johannes von Römer, Brigitte Seim, Rachel Sigman, Svend-Erik Skaaning, Jeffrey Staton, Aksel Sundström, Marcus Tannenberg, Eitan Tzelgov, Yi-ting Wang, Felix Wiebrecht, Tore Wig, Steven Wilson and Daniel Ziblatt. 2025. "V-Dem Country-Year Dataset v15" Varieties of Democracy (V-Dem) Project. https://doi.org/10.23696/vdemds25. 31 | #' 32 | #' @source https://www.v-dem.net/ 33 | #' 34 | "vdem" 35 | 36 | #' V-Dem codebook 37 | #' 38 | #' Loads as data frame selected information from the V-Dem dataset codebook 39 | #' 40 | #' For the full pdf version of the codebook and more info see https://www.v-dem.net/ 41 | #' 42 | #' 43 | #' @format A data frame with 828 observations and 14 variables 44 | #' 45 | #' @references Coppedge, Michael, John Gerring, Carl Henrik Knutsen, Staffan I. Lindberg, Jan Teorell, David Altman, Fabio Angiolillo, Michael Bernhard, Agnes Cornell, M. Steven Fish, Linnea Fox, Lisa Gastaldi, Haakon Gjerløw, Adam Glynn, Ana Good God, Sandra Grahn, Allen Hicken, Katrin Kinzelbach, Kyle L. Marquardt, Kelly McMann, Valeriya Mechkova, Anja Neundorf, Pamela Paxton, Daniel Pemstein, Johannes von Römer, Brigitte Seim, Rachel Sigman, Svend-Erik Skaaning, Jeffrey Staton, Aksel Sundström, Marcus Tannenberg, Eitan Tzelgov, Yi-ting Wang, Felix Wiebrecht, Tore Wig, and Daniel Ziblatt. 2025. "V-Dem Codebook v15" Varieties of Democracy (V-Dem) Project. https://v-dem.net/data/reference-documents/ 46 | #' 47 | #' @source https://www.v-dem.net/ 48 | #' 49 | "codebook" 50 | 51 | #' V-Party data 52 | #' 53 | #' Loads the most recent version of the V-Party dataset. 54 | #' 55 | #' Varieties of Democracy (V-Dem) is a new approach to conceptualizing 56 | #' and measuring democracy. We provide a multidimensional and disaggregated 57 | #' dataset that reflects the complexity of the concept of democracy as a 58 | #' system of rule that goes beyond the simple presence of elections. 59 | #' The V-Dem project distinguishes between five high-level principles of 60 | #' democracy: electoral, liberal, participatory, deliberative, and 61 | #' egalitarian, and collects data to measure these principles. 62 | #' With five Principal Investigators (PIs), thirty-nine Project Managers 63 | #' (PMs) with special responsibility for issue areas, 64 | #' more than thirty Regional Managers (RMs), 65 | #' 134 Country Coordinators (CCs), Research Assistants, 66 | #' and over 4,000 Country Experts (CEs). The V-Dem project is one 67 | #' of the largest social science data collection projects 68 | #' focusing on research. The Headquarters is based at the 69 | #' V-Dem Institute, the Department of Political Science at the 70 | #' University of Gothenburg, Sweden. The most recent data set (v15) 71 | #' covers 202 countries from 1789-2024 and includes 500+ indicators, 72 | #' 81 indices and 5 high-level indices. 73 | #' For more info see https://www.v-dem.net/ 74 | #' 75 | #' @format A data frame with 11898 observations and 384 variables. 76 | #' 77 | #' @references Lindberg, Staffan I., Nils Düpont, Masaaki Higashijima, Yaman Berker Kavasoglu, Kyle L. Marquardt, Michael Bernhard, Holger Döring, Allen Hicken, Melis Laebens, Juraj Medzihorsky, Anja Neundorf, Ora John Reuter, Saskia Ruth–Lovell, Keith R. Weghorst, Nina Wiesehomeier, Joseph Wright, Nazifa Alizada, Paul Bederke, Lisa Gastaldi, Sandra Grahn, Garry Hindle, Nina Ilchenko, Johannes von Römer, Steven Wilson, Daniel Pemstein, Brigitte Seim. 2022. Varieties of Party Identity and Organization (V–Party) Dataset V2. Varieties of Democracy (V–Dem) Project. https://www.v-dem.net/data/v-party-dataset/ 78 | #' 79 | #' @source https://www.v-dem.net/ 80 | #' 81 | "vparty" 82 | -------------------------------------------------------------------------------- /R/fill_vars.R: -------------------------------------------------------------------------------- 1 | #' Fill election-specific variables in V-Dem data 2 | #' 3 | #' A function to carryforward election-specific variables in V-Dem provided no interruption in 4 | #' the electoral regime (v2x_elecreg). 5 | #' 6 | #' Some variables in the V-Dem dataset are coded at the election-year only. However, users 7 | #' may wish to include these in country-year analyses. This function fills the election specific 8 | #' indicators for subsequent years, provided that there has not been any interruption in the 9 | #' electoral regime, as defined by v2x_elecreg. More specifically, it carries forward values between 10 | #' elections for all variables that are election-specific, unless v2x_elecreg becomes zero. 11 | #' 12 | #' The indicators being filled include: 13 | #' "v2elmulpar", "v2elpeace", "v2elrgstry", "v2elvotbuy", "v2elirreg", "v2elintim", "v2elboycot", 14 | #' "v2elfrcamp", "v2elpdcamp", "v2elfrfair", "v2elaccept", "v2elasmoff". 15 | #' 16 | #' Also filled are all _osp, _ord, _mean, _nr, _codelow, and _codehigh versions of these 17 | #' indicators. 18 | #' 19 | #' When v2x_elecreg becomes zero, the function by default leaves election-specific variables 20 | #' as missing (NA). Logically, one could infer that the lowest possible values are valid in 21 | #' such cases. Therefore, users can optionally specify that the election-specific variables 22 | #' with the suffix _osp, _ord, and _mean are recoded as zero when there is no electoral regime 23 | #' by setting fill_na=TRUE. 24 | #' 25 | #' This option does not currently apply to estimates from the measurement model because these 26 | #' variables follow an approximate z-score distribution without an absolute minimum. Future 27 | #' iterations of this function may provide additonal options for filling these values with 28 | #' some theoretical minimum. 29 | #' 30 | 31 | #' 32 | #' @param fill_na Whether the NA values for breaks in the electoral regime should be filled with zeros. The default = FALSE. 33 | #' 34 | #' @return A data frame with the most recent V-Dem dataset from the vdemdata package where election variables have 35 | #' been filled. 36 | #' 37 | #' @import dplyr 38 | #' 39 | #' @export 40 | #' 41 | #' @examples 42 | #' #Don't run 43 | #' # Fill vars for all election-specific variables in the most recent vdem dataset 44 | #' # vdem_filled <- fill_vars() 45 | #' 46 | 47 | fill_vars <- function(fill_na = FALSE) { 48 | 49 | # here are the election-specific variables 50 | vars <- vdemdata::vdem %>% 51 | select(contains(c("v2elmulpar", "v2elpeace", "v2elrgstry", "v2elvotbuy", 52 | "v2elirreg", "v2elintim", "v2elboycot", "v2elfrcamp", "v2elpdcamp", "v2elfrfair", 53 | "v2elaccept", "v2elasmoff"))) %>% 54 | colnames() 55 | # let's start with the vdem dataset 56 | vdem_filled <- vdemdata::vdem %>% 57 | # here we group and arrange the data into country-year 58 | group_by(country_text_id) %>% 59 | arrange(country_text_id, year) %>% 60 | # then we generate an identifier for each electoral regime 61 | # starting with the first observed year, then every time elecreg becomes zero 62 | mutate(elec_reg_start = ifelse(year==min(year) | (v2x_elecreg == 0 & lag(v2x_elecreg==1, n=1)), year, NA)) %>% 63 | # then we fill this identifier within the country 64 | tidyr::fill(elec_reg_start, .direction="down") %>% 65 | # now re-group by the new electoral regime identifier 66 | group_by(country_text_id, elec_reg_start) %>% 67 | arrange(country_text_id, year) %>% 68 | tidyr::fill(all_of(vars), .direction = "down") %>% 69 | ungroup() %>% 70 | select(-c(elec_reg_start)) 71 | 72 | # then we can optionally fill the election variables with zeros if there is no electoral regime (v2x_elecreg==0) 73 | # note: this isn't exactly precise, but gives lowest possible scores to cases without electoral regime 74 | # note 2: this option is currently limited to variables ending with _osp, _ord, and _mean because they 75 | # have a true minimum. future iterations may find a way to fill the variables from the measurement model 76 | if(fill_na==TRUE) { 77 | vars_z <- vdemdata::vdem %>% 78 | select(contains(c("v2elmulpar", "v2elpeace", "v2elrgstry", "v2elvotbuy", 79 | "v2elirreg", "v2elintim", "v2elboycot", "v2elfrcamp", "v2elpdcamp", "v2elfrfair", 80 | "v2elaccept", "v2elasmoff"))) %>% 81 | select(contains(c("_osp", "_ord", "_mean"))) %>% 82 | colnames() 83 | vdem_filled <- vdem_filled %>% 84 | purrr::modify_at(vars_z, ~ if_else(is.na(.) & vdem_filled$v2x_elecreg==0, 0, .)) 85 | } else { 86 | vdem_filled <- vdem_filled 87 | } 88 | { 89 | return(vdem_filled) 90 | } 91 | } 92 | 93 | -------------------------------------------------------------------------------- /R/plot_indicator.R: -------------------------------------------------------------------------------- 1 | #' Plot indicator(s) in V-Dem data. 2 | #' 3 | #' `plot_indicator` produces a combined lineplot and dotplot for selected 4 | #' countries and indicators from the V-Dem data set. 5 | #' 6 | #' This function is a wrapper for [ggplot2:ggplot()] and produces a combined 7 | #' lineplot and dotplot for selected indicators 8 | #' from the V-Dem dataset. It allow users to select multiple indicators 9 | #' as well as multiple countries. Users can adjust the time frame to be plotted. 10 | #' The function offers some sensible defaults 11 | #' for plotting. Additional plot options from [ggplot2:ggplot()] can be added 12 | #' outside the function call. Note that this function is mainly for exploratory analyses 13 | #' and might not be useful for all types of indicators in the data. 14 | #' 15 | #' @param indicator Character vector containing the indicators from the V-Dem data that are plotted (see codebook). 16 | #' @param countries Character vector containing the countries that are plotted. Only countries from the 17 | #' country_name column in the V-Dem data are accepted. If no countries are specified the global averages 18 | #' are plotted. 19 | #' @param min_year Numeric value representing the lower bound of the time frame (years) to be plotted. 20 | #' @param max_year Numeric value representing the upper bound of the time frame (years) to be plotted. 21 | #' @param uncertainty Logical value: adds uncertainty intervals to point estimates if available. 22 | #' 23 | #' @return The output of this function is a [ggplot2:ggplot()] object with lines and points 24 | #' for global averages of the selected indicators or point estimates for selected countries. 25 | #' 26 | #' @import dplyr ggplot2 tidyr tidyselect 27 | #' 28 | #' @examples 29 | #' \dontrun{ 30 | #' # Plot V-Dem indicators liberal democracy and egalitarian democracy 31 | #' # for Sweden and Germany between 1912 and 2000. 32 | #' 33 | #' plot_indicator(indicator=c( "v2x_egaldem", "v2x_libdem"), countries = c("Germany", "Sweden"), 34 | #' min_year = 1912, max_year = 2000) 35 | #' 36 | #' # Plot the global averages of V-Dem indicators electoral and egalitarian democracy 37 | #' # between 1940 and 2010. 38 | #' 39 | #' plot_indicator(indicator=c("v2x_polyarchy", "v2x_egaldem"), 40 | #' min_year = 1940, max_year = 2010) 41 | #' } 42 | #' @export 43 | plot_indicator <- function(indicator, 44 | countries = NULL, 45 | min_year = min(vdemdata::vdem$year), 46 | max_year = max(vdemdata::vdem$year), 47 | uncertainty = T) { 48 | 49 | year <- country_name <- value <- mean_indicator <- vdem <- name <- type <- codelow <- codehigh <- NULL 50 | 51 | # Specify sensible colors for plotted lines 52 | colour_palette <- c("#000000", "#1B9E77", "#D95F02", "#7570B3", "#E7298A", 53 | "#66A61E", "#E6AB02", "#A6761D", "#666666") 54 | 55 | # If no countries are selected, compute and plot the global average for the selected indicators 56 | if (is.null(countries) == T) { 57 | data <- vdemdata::vdem %>% 58 | dplyr::select(indicator = indicator, year, country_name) %>% 59 | dplyr::filter(year >= min_year & year <= max_year) %>% 60 | tidyr::pivot_longer(starts_with("indicator"), names_to = "indicator", values_to = "value") %>% 61 | dplyr::group_by(year, indicator) %>% 62 | dplyr::summarize(mean_indicator = mean(value, na.rm = T)) %>% 63 | tidyr::drop_na() 64 | 65 | ggplot2::ggplot(data, 66 | aes(x = year, y = mean_indicator, fill = indicator, shape = indicator)) + 67 | geom_line() + geom_point(size = 1) + xlab("") + 68 | ylab(ifelse(length(indicator) == 1, indicator, "")) + 69 | scale_x_continuous(breaks = seq(round(min_year / 10) * 10, round(max_year / 10) * 10, 10)) + 70 | scale_shape_manual("Indicator", values = rep(0:length(indicator)), labels = sort(indicator)) + 71 | scale_fill_manual("Indicator", values = rep("black", length(indicator)), labels = sort(indicator)) + 72 | theme_bw() 73 | } 74 | # If uncertainty is turned off or indicators do not have uncertainty estimates plot those variables 75 | else if (isTRUE(uncertainty) == F | length(intersect(colnames(vdemdata::vdem), paste(indicator, "_codehigh", sep = ""))) < 1) { 76 | data <- vdemdata::vdem %>% 77 | dplyr::select(indicator = all_of(indicator), year, country_name) %>% 78 | dplyr::filter(year >= min_year & year <= max_year) %>% 79 | dplyr::filter(country_name %in% countries) %>% 80 | dplyr::arrange(country_name) %>% 81 | tidyr::pivot_longer(starts_with("indicator"), names_to = "indicator", values_to = "value") %>% 82 | tidyr::drop_na() 83 | 84 | ggplot2::ggplot(data, 85 | aes(x = year, y = value, shape = indicator, color = country_name)) + 86 | geom_line(alpha = 0.80) + geom_point(size = 0.75) + xlab("") + 87 | ylab("") + 88 | scale_x_continuous(breaks = seq(round(min_year / 10) * 10, round(max_year / 10) * 10, 10)) + 89 | scale_color_manual(values = colour_palette[seq_len(length(countries))], name = "Country", 90 | labels = sort(countries)) + 91 | scale_shape_manual(values = rep(0:length(indicator)), labels = sort(indicator), name = "Indicator") + 92 | theme_bw() 93 | } 94 | # Plot selected variables for selected countries including uncertainty estimates 95 | else { 96 | indicator_high <- paste(indicator, "_codehigh", sep = "") 97 | indicator_low <- paste(indicator, "_codelow", sep = "") 98 | 99 | data <- vdemdata::vdem %>% 100 | dplyr::select(one_of(indicator), one_of(indicator_high), one_of(indicator_low), year, country_name) %>% 101 | dplyr::filter(year >= min_year & year <= max_year) %>% 102 | dplyr::filter(country_name %in% countries) %>% 103 | dplyr::arrange(country_name) %>% 104 | tidyr::pivot_longer(-c(country_name, year)) %>% 105 | dplyr::mutate(indicator = stringr::str_remove(name, "_codelow|_codehigh"), 106 | type = ifelse(stringr::str_detect(name, "_codelow"), "codelow", "value"), 107 | type = ifelse(stringr::str_detect(name, "_codehigh"), "codehigh", type)) %>% 108 | tidyr::pivot_wider(names_from = (type), 109 | values_from = value, 110 | id_cols = c(country_name, year, indicator)) %>% 111 | tidyr::drop_na() 112 | 113 | ggplot2::ggplot(data, 114 | aes(x = year, y = value, shape = indicator, color = country_name)) + 115 | geom_line(alpha = .80) + geom_point(size = 0.75) + 116 | geom_ribbon(aes(x = year, ymin = codelow, 117 | ymax = codehigh, 118 | linetype = NA, fill = country_name), alpha = .25) + xlab("") + 119 | xlab("") + ylab("") + 120 | scale_x_continuous(breaks = seq(round(min_year / 10) * 10, round(max_year / 10) * 10, 10)) + 121 | scale_color_manual(values = colour_palette[seq_len(length(countries))], name = "Country", 122 | labels = sort(countries)) + 123 | scale_fill_manual(values = colour_palette[seq_len(length(countries))], name = "Country", 124 | labels = sort(countries)) + 125 | scale_shape_manual(values = rep(0:length(indicator)), labels = sort(indicator), name = "Indicator") + 126 | theme_bw() 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /R/var_info.R: -------------------------------------------------------------------------------- 1 | #' Shows basic information on a specific variable as given in the codebook 2 | #' 3 | #' Provides information on full name as specified in the codebook, variable type, 4 | #' data collection process (questions, clarifications, responses), 5 | #' scale, aggregation, years and sources (plus notes) 6 | #' of a variable in the V-Dem data set 7 | #' 8 | #' @param var_tag A variable's name as used in the V-Dem data set, 9 | #' e.g. "v2x_polyarchy" for the electoral democracy index. 10 | #' Note: use quotation marks vor "var_tag". 11 | #' 12 | #' 13 | #' @return A list of information on the desired variable. 14 | #' 15 | #' @import dplyr 16 | #' @export 17 | #' 18 | #' @examples 19 | #' # Get information on the variable "v2x_polyarchy" (the electoral democracy index) 20 | #' var_info("v2x_polyarchy") 21 | var_info <- function(var_tag){ 22 | tag <- NULL 23 | vdemdata::codebook %>% 24 | dplyr::filter(tag %in% var_tag) %>% 25 | as.list() 26 | } 27 | 28 | #' Search variable information by one or several keywords 29 | #' 30 | #' \code{find_var} returns a data.frame with the Codebook 31 | #' information on the indicators. The keywords are searched 32 | #' in the names of variables. 33 | #' 34 | #' @param keywords A character vector of length one with one or 35 | #' several keywords separated by comma to search in 36 | #' the name of the variable. You can also pass regex 37 | #' notation (see \code{examples(find_var)}). 38 | #' 39 | #' @import dplyr 40 | #' 41 | #' @examples 42 | #' # Don't run 43 | #' # df <- find_var("Democracy, ^elect") 44 | #' # View(df) 45 | #' 46 | #' @export 47 | find_var <- function(keywords) { 48 | . <- name <- tag <- NULL 49 | pattern <- strsplit(keywords, ",") %>% 50 | unlist() %>% 51 | tolower() %>% 52 | gsub("^ ", "", x = .) %>% 53 | paste0(collapse = "|") 54 | 55 | df <- vdemdata::codebook %>% 56 | dplyr::filter(grepl(pattern, tolower(name))) %>% 57 | dplyr::arrange(tag) 58 | 59 | return(df) 60 | } 61 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | An R package to load, explore and work with the most recent [V-Dem (Varieties of Democracy)](https://www.v-dem.net/vdemds.html) and [V-Party](https://www.v-dem.net/vpartyds.html) datasets. 3 | 4 | ## V-Dem: Global Standards, Local Knowledge ## 5 | 6 | Varieties of Democracy (V-Dem) is a new approach to conceptualizing and measuring democracy. We provide a multidimensional and disaggregated dataset that reflects the complexity of the concept of democracy as a system of rule that goes beyond the simple presence of elections. The V-Dem project distinguishes between five high-level principles of democracy: electoral, liberal, participatory, deliberative, and egalitarian, and collects data to measure these principles. 7 | 8 | We are a team of over 50 social scientists on six continents. We work with more than 3,000 country experts and a truly global International Advisory Board. [Read more about the work we do here](https://www.v-dem.net/). 9 | 10 | 11 | ## The vdemdata R package ## 12 | 13 | This package contains the most recent V-Dem (Country-Year: V-Dem Full+Others) and V-Party datasets and provides some additional functions. 14 | 15 | #### Basics: #### 16 | * `vdem`: Load the V-Dem dataset (for non-R users, please access the V-Dem dataset [here](https://www.v-dem.net/vdemds.html)) 17 | * `vparty`: Load the V-Party dataset (for non-R users, please access the V-Party dataset [here](https://www.v-dem.net/vpartyds.html)) 18 | * `var_info`: Print to the console basic information on a specific variable as given in the codebook of the V-Dem dataset 19 | * `find_var`: Search variables via keywords in the V-Dem dataset 20 | * `fill_vars`: Fill election-specific variables in the V-Dem dataset 21 | 22 | #### Graphics: #### 23 | * `plot_indicator`: Plot V-Dem indicators for exploratory data analysis. 24 | 25 | 26 | ## Installation ## 27 | 28 | ``` 29 | # Install the development version of the vdemdata package 30 | # (the package is an ongoing project, 31 | # keep checking for updates) 32 | 33 | # First, you need to have the devtools package installed 34 | install.packages("devtools") 35 | # now, install the vdemdata package directly from GitHub 36 | devtools::install_github("vdeminstitute/vdemdata") 37 | 38 | # NOTE: make sure you have an updated R version and 39 | # - since the package is a development version - 40 | # an updated version of rlang, xcode (Mac), rtools (Windows), r-base-dev (Linux) 41 | # installed. If you have troubles with the installation 42 | # write to contact@v-dem.net at the V-Dem Institute. 43 | ``` 44 | 45 | ## Suggested Citations ## 46 | 47 | Please remember to cite this package and the underlying datasets when using them for published work. 48 | 49 | #### Package #### 50 | 51 | Maerz, Seraphine F., Amanda B. Edgell, Sebastian Hellemeier, Nina Illchenko, and Linnea Fox. 2025. vdemdata: An R package to load, explore and work with the most recent V-Dem (Varieties of Democracy) dataset. https://github.com/vdeminstitute/vdemdata 52 | 53 | 54 | #### V-Dem Country-Year+Others Dataset #### 55 | 56 | Coppedge, Michael, John Gerring, Carl Henrik Knutsen, Staffan I. Lindberg, Jan Teorell, David Altman, Fabio Angiolillo, Michael Bernhard, Agnes Cornell, M. Steven Fish, Linnea Fox, Lisa Gastaldi, Haakon Gjerløw, Adam Glynn, Ana Good God, Sandra Grahn, Allen Hicken, Katrin Kinzelbach, Joshua Krusell, Kyle L. Marquardt, Kelly McMann, Valeriya Mechkova, Juraj Medzihorsky, Natalia Natsika, Anja Neundorf, Pamela Paxton, Daniel Pemstein, Johannes von Römer, Brigitte Seim, Rachel Sigman, Svend-Erik Skaaning, Jeffrey Staton, Aksel Sundström, Marcus Tannenberg, Eitan Tzelgov, Yi-ting Wang, Felix Wiebrecht, Tore Wig, Steven Wilson and Daniel Ziblatt. 2025. "V-Dem Country-Year Dataset v15" Varieties of Democracy (V-Dem) Project. https://doi.org/10.23696/vdemds25. 57 | 58 | 59 | #### V-Party Dataset #### 60 | 61 | Lindberg, Staffan I., Nils Düpont, Masaaki Higashijima, Yaman Berker Kavasoglu, Kyle L. Marquardt, Michael Bernhard, Holger Döring, Allen Hicken, Melis Laebens, Juraj Medzihorsky, Anja Neundorf, Ora John Reuter, Saskia Ruth–Lovell, Keith R. Weghorst, Nina Wiesehomeier, Joseph Wright, Nazifa Alizada, Paul Bederke, Lisa Gastaldi, Sandra Grahn, Garry Hindle, Nina Ilchenko, Johannes von Römer, Steven Wilson, Daniel Pemstein, Brigitte Seim. 2022. Varieties of Party Identity and Organization (V–Party) Dataset V2. Varieties of Democracy (V–Dem) Project. https://www.v-dem.net/data/v-party-dataset/ 62 | 63 | -------------------------------------------------------------------------------- /data/codebook.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vdeminstitute/vdemdata/c7836967c508fd463ad4ef866529933938e30cb0/data/codebook.RData -------------------------------------------------------------------------------- /data/vdem.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vdeminstitute/vdemdata/c7836967c508fd463ad4ef866529933938e30cb0/data/vdem.RData -------------------------------------------------------------------------------- /data/vparty.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vdeminstitute/vdemdata/c7836967c508fd463ad4ef866529933938e30cb0/data/vparty.RData -------------------------------------------------------------------------------- /inst/CITATION: -------------------------------------------------------------------------------- 1 | citHeader("To cite the vdemdata R package in publications use:") 2 | 3 | citEntry( 4 | entry = "misc", 5 | title = "{Vdemdata - an R package to load, explore and work with the most recent V-Dem (Varieties of Democracy) and V-Party datasets}", 6 | author = personList(as.person("Seraphine Maerz"), 7 | as.person("Amanda Edgell"), 8 | as.person("Sebastian Hellmeier"), 9 | as.person("Nina Ilchenko"), 10 | as.person("Linnea Fox")), 11 | institution = "Varieties of Democracy (V-Dem) Project", 12 | year = 2025, 13 | url = "https://www.v-dem.net/en/", 14 | textVersion = "Seraphine Maerz, Amanda Edgell, Sebastian Hellmeier, Nina Ilchenko, Linnea Fox. 'Vdemdata - an R package to load, explore and work with the most recent V-Dem (Varieties of Democracy) and V-Party datasets'. Varieties of Democracy (V-Dem) Project. 2025. https://www.v-dem.net/en/ and https://github.com/vdeminstitute/vdemdata" 15 | ) 16 | 17 | -------------------------------------------------------------------------------- /inst/Updating.R: -------------------------------------------------------------------------------- 1 | 2 | # this script is about the yearly updating process of the package 3 | # (vdem, vpart, codebook) 4 | 5 | # PREP: fork the package / update your fork on your personal rep 6 | # pull latest package version to your local RStudio/git (version control set up) 7 | # do the following updates 8 | 9 | library(dplyr) 10 | 11 | remove_latex <- function(x) { 12 | x <- gsub("\\\\textit\\{([^}]+)\\}", "\\1", x) 13 | x <- gsub("\\\\href\\{([^}]+)\\}\\{([^}]+)\\}", "\\2", x) 14 | x <- gsub("\\\\emph\\{([^}]+)\\}", "\\1", x) 15 | x <- gsub("\\\\underline\\{([^}]+)\\}", "\\1", x) 16 | x <- gsub("\\\\end\\{itemize\\}|\\\\begin\\{itemize\\}", "", x) 17 | x <- gsub("\\\\item", "", x) 18 | x <- gsub("\\\\nth\\{([^}]+)\\}", "\\1", x) 19 | x <- gsub("\\\\|\\n\t\t|\\t\t|\\t|\\n", "", x) 20 | } 21 | 22 | # Load the new datasets and save them as RData in the package folder "data" 23 | # vdem 24 | vdem <- readRDS("~/data/ds_construction/v15/dataset/V-Dem-CY-Full+Others/V-Dem-CY-Full+Others-v15.rds") 25 | 26 | save("vdem", file = "data/vdem.RData") 27 | 28 | # vparty (if there are updates) 29 | vparty <- readRDS("V-Dem-CPD-Party-V2.rds") 30 | save("vparty", file = "data/vparty.RData") 31 | 32 | # Load vdem codebook 33 | # save as RData in the package folder "data" 34 | ellodiseff <- "We have used different calculations to find the lower chamber election district effective magnitude value, depending on the electoral system. In electoral systems with reserved seats, reserved seats are treated as a second tier in a hybrid system. Effective magnitude is calculated separately for reserved seats. Effective magnitude in such systems is the weighted average where the weight is the proportion of seats allocated in each tier." 35 | 36 | codebook <- readRDS("~/proj/reference_documents/refs/codebook.rds") %>% 37 | select(name, vartype, tag, projectmanager, question, clarification, responses, 38 | scale, notes, crosscoder_aggregation, cy_aggregation, datarelease, years, convergence) %>% 39 | filter(!grepl("commnt|coment|intro", tag)) %>% 40 | # fix formulas (most formulas are in aggregation and therefore not included in the package) 41 | mutate(clarification = case_when(tag == "v2ellodiseff" ~ ellodiseff, 42 | TRUE ~ clarification)) %>% 43 | # remove LaTeX code 44 | mutate(question = remove_latex(question), 45 | clarification = remove_latex(clarification), 46 | responses = remove_latex(responses), 47 | notes = remove_latex(notes), 48 | crosscoder_aggregation = remove_latex(crosscoder_aggregation), 49 | datarelease = remove_latex(datarelease), 50 | convergence = remove_latex(convergence)) 51 | 52 | dif <- setdiff(codebook$tag, unique(names(vdem))) 53 | select(vdem, starts_with(dif)) %>% names() 54 | 55 | save("codebook", file = "data/codebook.RData") 56 | 57 | # do any additional changes/updates of the scripts in 58 | # package folder /R or DESCRIPTION or README.md if required 59 | # e.g. update citation of datasets, package, etc. 60 | 61 | # document and check new package version 62 | devtools::document() 63 | devtools::check() 64 | 65 | # push to your personal rep 66 | # do a pull request to the original rep 67 | 68 | #### Release ##### 69 | # Go to the repository on Github at https://github.com/vdeminstitute/vdemdata 70 | 71 | # Click on "releases" on the right; you see a list with all previous releases 72 | 73 | # Click on "Draft a new release" 74 | 75 | # Choose a new tag for the release (e.g., V11.1, V12) 76 | 77 | # Select a title for the release and adjust the description 78 | # (mostly copy-paste from last release to keep it consistent) 79 | # You can use the "save draft" and "preview" buttons to make sure the release looks good 80 | 81 | # Click on "publish release" 82 | 83 | # all done and up-to-date :-) 84 | -------------------------------------------------------------------------------- /man/codebook.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{codebook} 5 | \alias{codebook} 6 | \title{V-Dem codebook} 7 | \format{ 8 | A data frame with 828 observations and 14 variables 9 | } 10 | \source{ 11 | https://www.v-dem.net/ 12 | } 13 | \usage{ 14 | codebook 15 | } 16 | \description{ 17 | Loads as data frame selected information from the V-Dem dataset codebook 18 | } 19 | \details{ 20 | For the full pdf version of the codebook and more info see https://www.v-dem.net/ 21 | } 22 | \references{ 23 | Coppedge, Michael, John Gerring, Carl Henrik Knutsen, Staffan I. Lindberg, Jan Teorell, David Altman, Fabio Angiolillo, Michael Bernhard, Agnes Cornell, M. Steven Fish, Linnea Fox, Lisa Gastaldi, Haakon Gjerløw, Adam Glynn, Ana Good God, Sandra Grahn, Allen Hicken, Katrin Kinzelbach, Kyle L. Marquardt, Kelly McMann, Valeriya Mechkova, Anja Neundorf, Pamela Paxton, Daniel Pemstein, Johannes von Römer, Brigitte Seim, Rachel Sigman, Svend-Erik Skaaning, Jeffrey Staton, Aksel Sundström, Marcus Tannenberg, Eitan Tzelgov, Yi-ting Wang, Felix Wiebrecht, Tore Wig, and Daniel Ziblatt. 2025. "V-Dem Codebook v15" Varieties of Democracy (V-Dem) Project. https://v-dem.net/data/reference-documents/ 24 | } 25 | \keyword{datasets} 26 | -------------------------------------------------------------------------------- /man/fill_vars.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fill_vars.R 3 | \name{fill_vars} 4 | \alias{fill_vars} 5 | \title{Fill election-specific variables in V-Dem data} 6 | \usage{ 7 | fill_vars(fill_na = FALSE) 8 | } 9 | \arguments{ 10 | \item{fill_na}{Whether the NA values for breaks in the electoral regime should be filled with zeros. The default = FALSE.} 11 | } 12 | \value{ 13 | A data frame with the most recent V-Dem dataset from the vdemdata package where election variables have 14 | been filled. 15 | } 16 | \description{ 17 | A function to carryforward election-specific variables in V-Dem provided no interruption in 18 | the electoral regime (v2x_elecreg). 19 | } 20 | \details{ 21 | Some variables in the V-Dem dataset are coded at the election-year only. However, users 22 | may wish to include these in country-year analyses. This function fills the election specific 23 | indicators for subsequent years, provided that there has not been any interruption in the 24 | electoral regime, as defined by v2x_elecreg. More specifically, it carries forward values between 25 | elections for all variables that are election-specific, unless v2x_elecreg becomes zero. 26 | 27 | The indicators being filled include: 28 | "v2elmulpar", "v2elpeace", "v2elrgstry", "v2elvotbuy", "v2elirreg", "v2elintim", "v2elboycot", 29 | "v2elfrcamp", "v2elpdcamp", "v2elfrfair", "v2elaccept", "v2elasmoff". 30 | 31 | Also filled are all _osp, _ord, _mean, _nr, _codelow, and _codehigh versions of these 32 | indicators. 33 | 34 | When v2x_elecreg becomes zero, the function by default leaves election-specific variables 35 | as missing (NA). Logically, one could infer that the lowest possible values are valid in 36 | such cases. Therefore, users can optionally specify that the election-specific variables 37 | with the suffix _osp, _ord, and _mean are recoded as zero when there is no electoral regime 38 | by setting fill_na=TRUE. 39 | 40 | This option does not currently apply to estimates from the measurement model because these 41 | variables follow an approximate z-score distribution without an absolute minimum. Future 42 | iterations of this function may provide additonal options for filling these values with 43 | some theoretical minimum. 44 | } 45 | \examples{ 46 | #Don't run 47 | # Fill vars for all election-specific variables in the most recent vdem dataset 48 | # vdem_filled <- fill_vars() 49 | 50 | } 51 | -------------------------------------------------------------------------------- /man/find_var.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/var_info.R 3 | \name{find_var} 4 | \alias{find_var} 5 | \title{Search variable information by one or several keywords} 6 | \usage{ 7 | find_var(keywords) 8 | } 9 | \arguments{ 10 | \item{keywords}{A character vector of length one with one or 11 | several keywords separated by comma to search in 12 | the name of the variable. You can also pass regex 13 | notation (see \code{examples(find_var)}).} 14 | } 15 | \description{ 16 | \code{find_var} returns a data.frame with the Codebook 17 | information on the indicators. The keywords are searched 18 | in the names of variables. 19 | } 20 | \examples{ 21 | # Don't run 22 | # df <- find_var("Democracy, ^elect") 23 | # View(df) 24 | 25 | } 26 | -------------------------------------------------------------------------------- /man/plot_indicator.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/plot_indicator.R 3 | \name{plot_indicator} 4 | \alias{plot_indicator} 5 | \title{Plot indicator(s) in V-Dem data.} 6 | \usage{ 7 | plot_indicator( 8 | indicator, 9 | countries = NULL, 10 | min_year = min(vdemdata::vdem$year), 11 | max_year = max(vdemdata::vdem$year), 12 | uncertainty = T 13 | ) 14 | } 15 | \arguments{ 16 | \item{indicator}{Character vector containing the indicators from the V-Dem data that are plotted (see codebook).} 17 | 18 | \item{countries}{Character vector containing the countries that are plotted. Only countries from the 19 | country_name column in the V-Dem data are accepted. If no countries are specified the global averages 20 | are plotted.} 21 | 22 | \item{min_year}{Numeric value representing the lower bound of the time frame (years) to be plotted.} 23 | 24 | \item{max_year}{Numeric value representing the upper bound of the time frame (years) to be plotted.} 25 | 26 | \item{uncertainty}{Logical value: adds uncertainty intervals to point estimates if available.} 27 | } 28 | \value{ 29 | The output of this function is a [ggplot2:ggplot()] object with lines and points 30 | for global averages of the selected indicators or point estimates for selected countries. 31 | } 32 | \description{ 33 | `plot_indicator` produces a combined lineplot and dotplot for selected 34 | countries and indicators from the V-Dem data set. 35 | } 36 | \details{ 37 | This function is a wrapper for [ggplot2:ggplot()] and produces a combined 38 | lineplot and dotplot for selected indicators 39 | from the V-Dem dataset. It allow users to select multiple indicators 40 | as well as multiple countries. Users can adjust the time frame to be plotted. 41 | The function offers some sensible defaults 42 | for plotting. Additional plot options from [ggplot2:ggplot()] can be added 43 | outside the function call. Note that this function is mainly for exploratory analyses 44 | and might not be useful for all types of indicators in the data. 45 | } 46 | \examples{ 47 | \dontrun{ 48 | # Plot V-Dem indicators liberal democracy and egalitarian democracy 49 | # for Sweden and Germany between 1912 and 2000. 50 | 51 | plot_indicator(indicator=c( "v2x_egaldem", "v2x_libdem"), countries = c("Germany", "Sweden"), 52 | min_year = 1912, max_year = 2000) 53 | 54 | # Plot the global averages of V-Dem indicators electoral and egalitarian democracy 55 | # between 1940 and 2010. 56 | 57 | plot_indicator(indicator=c("v2x_polyarchy", "v2x_egaldem"), 58 | min_year = 1940, max_year = 2010) 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /man/var_info.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/var_info.R 3 | \name{var_info} 4 | \alias{var_info} 5 | \title{Shows basic information on a specific variable as given in the codebook} 6 | \usage{ 7 | var_info(var_tag) 8 | } 9 | \arguments{ 10 | \item{var_tag}{A variable's name as used in the V-Dem data set, 11 | e.g. "v2x_polyarchy" for the electoral democracy index. 12 | Note: use quotation marks vor "var_tag".} 13 | } 14 | \value{ 15 | A list of information on the desired variable. 16 | } 17 | \description{ 18 | Provides information on full name as specified in the codebook, variable type, 19 | data collection process (questions, clarifications, responses), 20 | scale, aggregation, years and sources (plus notes) 21 | of a variable in the V-Dem data set 22 | } 23 | \examples{ 24 | # Get information on the variable "v2x_polyarchy" (the electoral democracy index) 25 | var_info("v2x_polyarchy") 26 | } 27 | -------------------------------------------------------------------------------- /man/vdem.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{vdem} 5 | \alias{vdem} 6 | \title{V-Dem data} 7 | \format{ 8 | A data frame with 27913 observations and 4607 variables. 9 | } 10 | \source{ 11 | https://www.v-dem.net/ 12 | } 13 | \usage{ 14 | vdem 15 | } 16 | \description{ 17 | Loads the most recent version of the V-Dem dataset. 18 | } 19 | \details{ 20 | Varieties of Democracy (V-Dem) is a new approach to conceptualizing 21 | and measuring democracy. We provide a multidimensional and disaggregated 22 | dataset that reflects the complexity of the concept of democracy as a 23 | system of rule that goes beyond the simple presence of elections. 24 | The V-Dem project distinguishes between five high-level principles of 25 | democracy: electoral, liberal, participatory, deliberative, and 26 | egalitarian, and collects data to measure these principles. 27 | With five Principal Investigators (PIs), thirty-nine Project Managers 28 | (PMs) with special responsibility for issue areas, 29 | more than thirty Regional Managers (RMs), 30 | 134 Country Coordinators (CCs), Research Assistants, 31 | and over 4,000 Country Experts (CEs). The V-Dem project is one 32 | of the largest social science data collection projects 33 | focusing on research. The Headquarters is based at the 34 | V-Dem Institute, the Department of Political Science at the 35 | University of Gothenburg, Sweden. The most recent data set (v15) 36 | covers 202 countries from 1789-2024 and includes 500+ indicators, 37 | 81 indices and 5 high-level indices. 38 | For more info see https://www.v-dem.net/ 39 | } 40 | \references{ 41 | Coppedge, Michael, John Gerring, Carl Henrik Knutsen, Staffan I. Lindberg, Jan Teorell, David Altman, Fabio Angiolillo, Michael Bernhard, Agnes Cornell, M. Steven Fish, Linnea Fox, Lisa Gastaldi, Haakon Gjerløw, Adam Glynn, Ana Good God, Sandra Grahn, Allen Hicken, Katrin Kinzelbach, Joshua Krusell, Kyle L. Marquardt, Kelly McMann, Valeriya Mechkova, Juraj Medzihorsky, Natalia Natsika, Anja Neundorf, Pamela Paxton, Daniel Pemstein, Johannes von Römer, Brigitte Seim, Rachel Sigman, Svend-Erik Skaaning, Jeffrey Staton, Aksel Sundström, Marcus Tannenberg, Eitan Tzelgov, Yi-ting Wang, Felix Wiebrecht, Tore Wig, Steven Wilson and Daniel Ziblatt. 2025. "V-Dem Country-Year Dataset v15" Varieties of Democracy (V-Dem) Project. https://doi.org/10.23696/vdemds25. 42 | } 43 | \keyword{datasets} 44 | -------------------------------------------------------------------------------- /man/vparty.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{vparty} 5 | \alias{vparty} 6 | \title{V-Party data} 7 | \format{ 8 | A data frame with 11898 observations and 384 variables. 9 | } 10 | \source{ 11 | https://www.v-dem.net/ 12 | } 13 | \usage{ 14 | vparty 15 | } 16 | \description{ 17 | Loads the most recent version of the V-Party dataset. 18 | } 19 | \details{ 20 | Varieties of Democracy (V-Dem) is a new approach to conceptualizing 21 | and measuring democracy. We provide a multidimensional and disaggregated 22 | dataset that reflects the complexity of the concept of democracy as a 23 | system of rule that goes beyond the simple presence of elections. 24 | The V-Dem project distinguishes between five high-level principles of 25 | democracy: electoral, liberal, participatory, deliberative, and 26 | egalitarian, and collects data to measure these principles. 27 | With five Principal Investigators (PIs), thirty-nine Project Managers 28 | (PMs) with special responsibility for issue areas, 29 | more than thirty Regional Managers (RMs), 30 | 134 Country Coordinators (CCs), Research Assistants, 31 | and over 4,000 Country Experts (CEs). The V-Dem project is one 32 | of the largest social science data collection projects 33 | focusing on research. The Headquarters is based at the 34 | V-Dem Institute, the Department of Political Science at the 35 | University of Gothenburg, Sweden. The most recent data set (v15) 36 | covers 202 countries from 1789-2024 and includes 500+ indicators, 37 | 81 indices and 5 high-level indices. 38 | For more info see https://www.v-dem.net/ 39 | } 40 | \references{ 41 | Lindberg, Staffan I., Nils Düpont, Masaaki Higashijima, Yaman Berker Kavasoglu, Kyle L. Marquardt, Michael Bernhard, Holger Döring, Allen Hicken, Melis Laebens, Juraj Medzihorsky, Anja Neundorf, Ora John Reuter, Saskia Ruth–Lovell, Keith R. Weghorst, Nina Wiesehomeier, Joseph Wright, Nazifa Alizada, Paul Bederke, Lisa Gastaldi, Sandra Grahn, Garry Hindle, Nina Ilchenko, Johannes von Römer, Steven Wilson, Daniel Pemstein, Brigitte Seim. 2022. Varieties of Party Identity and Organization (V–Party) Dataset V2. Varieties of Democracy (V–Dem) Project. https://www.v-dem.net/data/v-party-dataset/ 42 | } 43 | \keyword{datasets} 44 | -------------------------------------------------------------------------------- /vdemdata.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | AutoAppendNewline: Yes 16 | StripTrailingWhitespace: Yes 17 | 18 | BuildType: Package 19 | PackageUseDevtools: Yes 20 | PackageInstallArgs: --no-multiarch --with-keep.source 21 | --------------------------------------------------------------------------------