Description Usage Arguments Value Examples
View source: R/get_rep_address.R
This function interacts with the representatives endpoint of the Google Civic Information API
1 2 3 4 5 6 7 | get_rep_address(
address = NULL,
includeOffices = NULL,
levels = NULL,
roles = NULL,
key = Sys.getenv("google_civic_api")
)
|
address |
Address supplied as string |
includeOffices |
Whether to return information about offices and officials. False returns only top-level district information. Default is true. |
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" |
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 9 | ## Not run:
get_rep_address(
address = "55 e monroe, chicago, il",
level = "regional",
role = "schoolBoard",
key = Sys.getenv("google_civic_api")
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.