Title: | German Election Database (GERDA) |
Version: | 0.1.0 |
Description: | Provides tools to download comprehensive datasets of local, state, and federal election results in Germany from 1990 to 2021. The package facilitates access to data on turnout, vote shares for major parties, and demographic information across different levels of government (municipal, state, and federal). It offers access to geographically harmonized datasets that account for changes in municipal boundaries over time and incorporate mail-in voting districts. Users can easily retrieve, clean, and standardize German electoral data, making it ready for analysis. Data is sourced from http://www.german-elections.com. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.2 |
Depends: | R (≥ 2.10) |
Imports: | stringdist, dplyr, readr, knitr, tibble |
Suggests: | rmarkdown, testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
URL: | https://github.com/hhilbig/gerda |
BugReports: | https://github.com/hhilbig/gerda/issues |
VignetteBuilder: | knitr |
Maintainer: | Hanno Hilbig <hhilbig@ucdavis.edu> |
NeedsCompilation: | no |
Packaged: | 2024-11-19 16:38:56 UTC; hanno |
Author: | Hanno Hilbig |
Repository: | CRAN |
Date/Publication: | 2024-11-20 19:10:01 UTC |
List of GERDA Data
Description
This function lists the available GERDA data sets. The purpose of this function is to quickly provide a list of available data sets and their descriptions.
Usage
gerda_data_list(print_table = TRUE)
Arguments
print_table |
A logical value indicating whether to print the table in the console (TRUE) or return the data as a tibble (FALSE). Default is TRUE. |
Value
A tibble containing the available GERDA data with descriptions. When print_table = TRUE, the function prints a formatted table to the console and invisibly returns the data tibble. When print_table = FALSE, the function directly returns the data tibble.
Examples
gerda_data_list()
Load GERDA Data
Description
This function loads GERDA data from a web source.
Usage
load_gerda_web(file_name, verbose = FALSE, file_format = "rds")
Arguments
file_name |
A character string specifying the name of the file to load. For a list of available data, see |
verbose |
A logical value indicating whether to print additional messages to the console. Default is FALSE. |
file_format |
A character string specifying the format of the file. Must be either "csv" or "rds". Default is "rds". |
Value
A tibble containing the loaded data, or NULL if the data could not be loaded.
Examples
data_municipal_harm <- load_gerda_web("municipal_harm", verbose = TRUE, file_format = "rds")