I am happy to announce a new release (version 0.4) of the R-package pvsR on Bitbucket. pvsR facilitates data retrieval from Project Vote Smart‘s rich online data base on US politics via the Project Vote Smart application programming interface (PVS API). The functions in this package cover most PVS API classes and methods and return the requested data in data-frames (and classes “tbl_df”, “tbl”). See here for extended examples and background. The new version includes the following improvements:
- Replaced internal function dfList() with faster implementation in dplyr::bind_rows, removed dfList() from package.
- In order to improve the comfort in interactive sessions, all high-level functions for querying data from the PVS API return now objects of class “tbl_df”/”tbl”/”data.frame”.
- Improved code-readability/formatting.
How to install/use
# install/load package library(devtools) install_bitbucket("ulrich-matter/pvsR") library(pvsR) # define api-key variable (use personal key, see http://votesmart.org/share/api) pvs.key <- "<YOUR-KEY-HERE>" # get biographical data on Hilary Clinton and Donald Trump Candidates.getByLastname(list("Clinton", "Trump"))
Suggestions and issue reports very welcome
Please feel free to make suggestions, and report issues (preferably via the issue-tracker in the Bitbucket-repository).