get_cong_data: Load CongressData into the R environment

View source: R/get_cong_data.R

get_cong_dataR Documentation

Load CongressData into the R environment

Description

get_cong_data loads either a full or subsetted version of the full CongressData dataset into the R environment as a dataframe.

Usage

get_cong_data(states = NULL, related_to = "", years = NULL)

Arguments

states

Default is NULL. If left blank, returns all states. Takes a string or vector of strings of state names.

related_to

Default is "". Provide a string to search a variable's name, short/long descriptions from the codebook, and its citation for non-exact matches o f a search term. For example, searching 'tax' will return variables with words like 'taxes' and 'taxable' in any of those columns.

years

Default is NULL. If left blank, returns all years Input can be a single year (e.g. 2001) or a two year that represent the first and last that you want in the outputted dataframe (such as c(1989, 20001)).

Value

An object of type tibble containing CongressData. The tibble has columns corresponding to variables in the dataset, and rows corresponding to observations that match the filtering criteria specified by the states, related_to, and years parameters.


CongressData documentation built on June 19, 2025, 5:08 p.m.