Package 'gerda'

Title: German Election Database (GERDA)
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>.
Authors: Hanno Hilbig [aut, cre]
Maintainer: Hanno Hilbig <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2024-11-25 15:08:13 UTC
Source: CRAN

Help Index


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

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