Description Usage Arguments Value Examples
View source: R/get_rep_by_division.R
This function interacts with the representatives endpoint of the Google Civic Information API
1 2 3 4 5 6 7 | get_rep_by_division(
ocdId = NULL,
levels = NULL,
recursive = NULL,
roles = NULL,
key = Sys.getenv("google_civic_api")
)
|
ocdId |
An Open Civic Data Division Identifier, e.g. from the |
levels |
List of office levels supplied as string. Only offices that serve at least one of these levels will be returned Acceptable values are: "administrativeArea1", "administrativeArea2", "country", "international", "locality", "regional", "special", "subLocality1", "subLocality2" |
recursive |
If |
roles |
List of roles supplied as string. Only offices fulfilling one of these roles will be returned. Acceptable values are: "deputyHeadOfGovernment", "executiveCouncil", "governmentOfficer", "headOfGovernment", "headOfState", "highestCourtJudge", "judge", "legislatorLowerBody", "legislatorUpperBody", "schoolBoard", "specialPurposeOfficer" |
key |
API key supplied as a string. Defaults to the environmental variable called "google_civic_api." Info on how to get a key can be found here: https://developers.google.com/civic-information |
Returns a list of offices by divisions and respective officials
1 2 3 4 5 6 7 8 | ## Not run:
get_rep_by_division(
ocdId = "ocd-division/country:us/district:dc",
level="locality",
recursive = TRUE
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.