MyNixOS website logo
Description

German Election Database (GERDA).

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>.

GERDA R Package

This package provides functions to access and work with GERDA datasets.

Note: This package is currently a work in progress. Comments and suggestions are welcome -- please send to [email protected].

Installation

You can install the development version of GERDA from GitHub using the devtools package:

# Install devtools if you haven't already
if (!requireNamespace("devtools", quietly = TRUE)) {
  install.packages("devtools")
}

# Install GERDA
devtools::install_github("hhilbig/gerda")

Main Functions

  • gerda_data_list(print_table = TRUE): Lists all available GERDA datasets along with their descriptions. Parameters:

    • print_table: If TRUE (default), prints a formatted table to the console and invisibly returns a tibble. If FALSE, directly returns the tibble without printing.
  • load_gerda_web(file_name, verbose = FALSE, file_format = "rds"): This function loads a GERDA dataset from a web source. It takes the following parameters:

    • file_name: The name of the dataset to load (see gerda_data_list() for available options).
    • verbose: If set to TRUE, it prints messages about the loading process (default is FALSE).
    • file_format: Specifies the format of the file to load, either "rds" or "csv" (default is "rds").

    The function includes fuzzy matching for file names and will suggest close matches if an exact match isn't found.

Usage Examples

# Load the package
library(gerda)

# List available datasets
available_data <- gerda_data_list()

# Load a dataset
data_municipal_harm <- load_gerda_web("municipal_harm", verbose = TRUE, file_format = "rds")

Note

For a complete list of available datasets and their descriptions, use the gerda_data_list() function. This function either prints a formatted table to the console and invisibly returns a tibble or directly returns the tibble without printing.

Feedback

As this package is a work in progress, we welcome feedback. Please send your comments to [email protected] or open an issue on the GitHub repository.

Metadata

Version

0.1.0

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows