Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.1%) to scientific vocabulary
Repository
R package to access GERDA data in R
Basic Info
Statistics
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
GERDA R Package
This package 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.
Note: This package is currently a work in progress. Comments and suggestions are welcome -- please send to hhilbig@ucdavis.edu.
Installation
You can install GERDA from CRAN:
R
install.packages("gerda")
Or install the development version from GitHub:
```R
Install devtools if you haven't already
if (!requireNamespace("devtools", quietly = TRUE)) { install.packages("devtools") }
Install GERDA development version
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: IfTRUE(default), prints a formatted table to the console and invisibly returns a tibble. IfFALSE, 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 (seegerda_data_list()for available options).verbose: If set toTRUE, it prints messages about the loading process (default isFALSE).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.
party_crosswalk(party_gerda, destination): Maps party names to their corresponding values from the ParlGov database. For a vector of party names, it returns a vector of the same length with the corresponding values from the destination column. Parameters:party_gerda: A character vector of party names using GERDA's naming schemedestination: The name of the column from ParlGov's viewparty table to map to (e.g., "leftright" for ideology scores)
Usage Examples
```R
Load the package
library(gerda)
List available datasets
availabledata <- gerdadata_list()
Load a dataset
datamunicipalharm <- loadgerdaweb("municipalharm", verbose = TRUE, fileformat = "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 hhilbig@ucdavis.edu or open an issue on the GitHub repository.
Owner
- Name: Hanno
- Login: hhilbig
- Kind: user
- Location: Davis, CA
- Company: University of California, Davis
- Website: www.hannohilbig.com
- Repositories: 3
- Profile: https://github.com/hhilbig
GitHub Events
Total
- Watch event: 2
- Member event: 1
- Public event: 1
- Push event: 27
Last Year
- Watch event: 2
- Member event: 1
- Public event: 1
- Push event: 27
Packages
- Total packages: 1
-
Total downloads:
- cran 525 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: gerda
German Election Database (GERDA)
- Homepage: https://github.com/hhilbig/gerda
- Documentation: http://cran.r-project.org/web/packages/gerda/gerda.pdf
- License: MIT + file LICENSE
-
Latest release: 0.2.0
published 10 months ago
Rankings
Maintainers (1)
Dependencies
- R >= 2.10 depends
- dplyr * imports
- knitr * imports
- readr * imports
- stringdist * imports
- tibble * imports
- rmarkdown * suggests
- testthat >= 3.0.0 suggests