Easy access to data on US politics: New version of pvsR now on BitBucket

July 19, 2016

(This article was first published on GivenTheData, and kindly contributed to R-bloggers)

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
# define api-key variable (use personal key, see http://votesmart.org/share/api)
pvs.key <- ""
# 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).

To leave a comment for the author, please follow the link and comment on their blog: GivenTheData.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)