Description Usage Arguments Details Value Author(s) References Examples
This function is essentially a wrapper around Local.getOfficials().
1 2 | getAllLocalOfficials(locality="counties", batchsize=50,
pause=0, backupfile="locofs.list.Rdata")
|
locality |
a character string indicating whether data on county-officials ("counties") or city-officials ("cities") should be downloaded. |
batchsize |
numerical, indicating the number of requests that should be processed in one batch (defaults to 50). |
pause |
numerical, indicating how long (in seconds) the download process should be paused after each batch (defaults to 0) |
backupfile |
character string for the path/file-name of the Rdata-file where the data should be saved (batch-wise) during the download process (default: "locofs.list.Rdata"). |
This functions splits large requests into several batches. The requests are then processed batch-wise and are saved on the local disc to make sure that not too much RAM is assigned to the pvsR task.
A data frame with a row for each official and columns with
the following variables describing the official:
candidatelist.candidate*.candidateId,
candidatelist.candidate*.firstName,
candidatelist.candidate*.nickName,
candidatelist.candidate*.middleName,
candidatelist.candidate*.lastName,
candidatelist.candidate*.suffix,
candidatelist.candidate*.title,
candidatelist.candidate*.electionParties,
candidatelist.candidate*.electionDistrictId,
candidatelist.candidate*.electionStateId,
candidatelist.candidate*.officeParties,
candidatelist.candidate*.officeDistrictId,
candidatelist.candidate*.officeDistrictName,
candidatelist.candidate*.officeStateId,
candidatelist.candidate*.officeId,
candidatelist.candidate*.officeName,
candidatelist.candidate*.officeTypeId.
Ulrich Matter <ulrich.matter-at-unibas.ch>
http://api.votesmart.org/docs/Local.html
Use
Local.getCounties() or Local.getCities() to get a list of
local IDs.
1 2 3 4 5 | # First, make sure your personal PVS API key is saved as character string in the pvs.key variable:
## Not run: pvs.key <- "yourkey"
# get a list of all local officials
## Not run: all_countyofficials <- getAllLocalOfficials()
## Not run: head(officials)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.