Learn R Programming

pvsR (version 0.3)

An R package to interact with the Project Vote Smart API for scientific research

Description

The pvsR package 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 a data frame.

Copy Link

Version

Install

install.packages('pvsR')

Monthly Downloads

16

Version

0.3

License

GPL-2

Maintainer

Ulrich Matter

Last Published

September 23rd, 2014

Functions in pvsR (0.3)

Candidates.getByDistrict

Get a list of candidates according to the district they represent
Office.getTypes

Get all office types tracked
Leadership.getOfficials

Get officials that hold the leadership role in certain states
Election.getElection

Get district basic election data
District.getByOfficeState

Get district IDs according to the office and state
Election.getElectionByZip

Get district basic election data according to the ZIP code
Committee.getTypes

Get the committee types (house, senate, joint, etc.)
CandidateBio.getDetailedBio

Get a candidate's detailed biographical information
Measure.getMeasure

Get details of a ballot measure
Office.getLevels

Get a list of levels of government and their IDs
Candidates.getByElection

Get a list of candidates according to the election they are running for
CandidateBio.getAddlBio

Get a candidate's additional biographical information
Rating.getSig

Get detailed information about a special interest group
Election.getStageCandidates

Get district basic election data according to election ID and stage ID
Leadership.getPositions

Get leadership positions by state and office
Votes.getBillsByOfficialYearOffice

Get a list of bills according to office (optional), candidate and year
Candidates.getByLevenshtein

Get a list of candidates according to an approximate lastname match
Candidates.getByLastname

Get a list of candidates according to their lastname
Office.getOfficesByLevel

Get offices tracked according to level
Officials.getByLastname

Get a list of officials according to a last name match
Committee.getCommittee

Get detailed committee (contact) information
Candidates.getByOfficeState

Get a list of candidates according to office and state representation
CandidateBio.getBio

Get a candidate's main biographical information
District.getByZip

Get district IDs according to the zip code
Office.getBranches

Get a list of branches of government and their IDs
Election.getElectionByYearState

Get district basic election data according to year and state ID
Local.getOfficials

Get officials for a locality
Office.getOfficesByBranchLevel

Get offices tracked according to branch and level
Committee.getCommitteeMembers

Get a list of members of a committee
Officials.getByDistrict

Get a list of officials according to the district they are running for
Local.getCities

Get cities in a state
Rating.getCandidateRating

Get a candidate's rating by special interest groups
Rating.getSigList

Get a list of special interest groups according to rating category and state.
Officials.getStatewide

Get a list of officials according to state representation
Candidates.getByZip

Get a list of candidates according to ZIP code
Rating.getSigRatings

Get all ratings (scorecards) by a special interest group
Office.getOfficesByType

Get offices tracked according to type
Rating.getRating

Get all candidate ratings from an evaluation by a special interest group
Npat.getNpat

Get a candidate's most recently filled out NPAT/PCT (Political Courage Test)
Officials.getByLevenshtein

Get a list of officials according to an approximate last name match
Local.getCounties

Get counties in a state
Officials.getByOfficeTypeState

Get a list of officials according to office type and state
Votes.getVetoes

Get a list of vetoes according to candidate
State.getState

Get information about a state
getAllCities

Get basic data on all cities
Votes.getBillsBySponsorCategory

Get a list of bills according to sponsor(candidate) and category
Votes.getBill

Get general information on a bill
Votes.getBillsByYearState

Get a list of bills according to year and state
getAllLocalOfficials

Fetch data on all local (city- or county-) officials
Votes.getBillsByCategoryYearState

Get a list of bills according to category, year and state
getAllBios

Get several candidates' biographical information
Votes.getBillsByStateRecent

Get a list of recent bills according to the state.
Votes.getBillsBySponsorYear

Get a list of bills according to sponsor(candidate) and year
Votes.getBillActionVotes

Get votes listed by candidate on a certain bill action
Votes.getBillsByOfficialCategoryOffice

Get a list of bills according to office, candidate and category
Votes.getCategories

Get a list of categories that contain released bills according to year and state
Candidates.getByOfficeTypeState

Get a list of candidates according to office type and state representation
getOffices

Get basic data on all offices
Votes.getBillAction

Get detailed action information on a certain stage of the bill
State.getStateIDs

Get a list of states and their IDs.
getAllCounties

Get basic data on all counties
Rating.getCategories

Get categories that contain released ratings according to state
Votes.getByOfficial

Get all the bills an official has voted on by year
getAllDistricts

Get basic data on all districts
Officials.getByOfficeState

Get a list of officials according to office
getAllVotes

Get several votes
Officials.getByZip

Get a list of officials according to the ZIP code
Committee.getCommitteesByTypeState

Get a list of committees according to type and state
Votes.getBillActionVoteByOfficial

Get a single vote according to official and action
Measure.getMeasuresByYearState

Get a list of state ballot measures in a given year