Changelog
Source:NEWS.md
filibustr 0.3.0 (2025-03-30)
CRAN release: 2025-03-31
Breaking changes
- MAJOR CHANGE: Redesigned the interface for reading from local files. Now, to read from a local file, specify the file path using
local_path
(#17).- A given function call will now read data from either online or a local file, not try both. There is no longer an “online fallback” if a local file is not found.
- Filtering local files: when working with local files, you can download one big file, and filter that file to smaller datasets as needed - no need to make multiple slow downloads!
- The supported file types for local reading are: .csv, .dta, .tab, .tsv
Here is some example usage of the local_path
argument, including the ability to filter local files:
## download large dataset
all_members <- get_voteview_members()
nrow(all_members) # 51036
levels(all_members$chamber) # "President" "House" "Senate"
range(all_members$congress) # 1 119 (or the `current_congress()`)
## save to local file
tmp_csv <- tempfile(fileext = ".csv")
readr::write_csv(all_members, tmp_csv)
## read data from local file - much faster than downloading from online!
local_members <- get_voteview_members(local_path = tmp_csv)
nrow(local_members) # 51036
## read smaller datasets from the local file
senators <- get_voteview_members(chamber = "sen", local_path = tmp_csv)
nrow(senators) # 10125
levels(senators$chamber) # "President" "Senate"
congresses_100_to_110 <- get_voteview_members(congress = 100:110,
local_path = tmp_csv)
nrow(congresses_100_to_110) # 6008
range(congresses_100_to_110$congress) # 100 110
house_117 <- get_voteview_members(chamber = "hr", congress = 117,
local_path = tmp_csv)
nrow(house_117) # 457
levels(house_117$chamber) # "President" "House"
range(house_117$congress) # 117 117
- In the Voteview functions, an invalid
congress
now produces an error, instead of silently returning data for all Congresses. - In
get_les()
, returned data frames now use more specific column types, such as integer for count data and logical for binary data (#10).- NOTE: state abbreviations (columns
state
,st_name
) and LES scores relative to expectation (columnsexpectation
,expectation1
,expectation2
) are now factor variables.
- NOTE: state abbreviations (columns
-
get_voteview_members()
: fix factor levels in thestate_abbrev
column. - In
get_les()
, 0- or 1-character strings forbioname
are converted toNA
.
New features
- {filibustr} now has a documentation website! You can visit it at https://feinleib.github.io/filibustr/ (#18).
- New
get_voteview_cast_codes()
provides the cast codes used in Voteview’s member votes data (#13). - New
read_html_table()
for reading HTML tables from online. It’s a nice shortcut for a common {rvest} workflow that otherwise takes 3 functions.read_html_table()
was previously an internal function, but it’s useful enough that I think it should be exported, even if it’s not a core functionality of {filibustr} (#20).
Minor improvements and bug fixes
- Improved error messages with
cli::cli_abort()
(#9). - When reading data from online, now retry up to 3 times in case of HTTP errors.
- Fixes to online tests for CRAN.
- Removed dependencies: {crul}, {R.utils}, {tidyselect}.
- New dependencies: {cli}, {tools}.
filibustr 0.2.1 (2024-05-02)
CRAN release: 2024-05-02
Bug fixes
- Handle HTTP errors when using online connections (#12).
filibustr 0.2.0 (2024-03-01)
CRAN release: 2024-03-01
Breaking changes
-
get_lhy_data()
has been renamed toget_hvw_data()
. - In
get_voteview_*()
,chamber
andcongress
now come beforelocal
andlocal_dir
. This matches the argument order inget_hvw_data()
(#3).