Candidates.getByDistrict(districtId, electionYear=NULL)
# First, make sure your personal PVS API key is saved as character string in the pvs.key variable:
pvs.key <- "yourkey"
# get a list of candidates of certain districts
district <- Candidates.getByDistrict(list(25157,25155),2012)
district
Run the code above in your browser using DataLab