get_cong_data {CongressData} | R 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 |
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.