get_voterinfo: get_voterinfo

Description Usage Arguments Value Examples

View source: R/get_voterinfo.R

Description

This function interacts with the voterinfo endpoint of the Google Civic Information API

Usage

1
2
3
4
5
get_voterinfo(
  address = NULL,
  electionid = NULL,
  key = Sys.getenv("google_civic_api")
)

Arguments

address

Address supplied as string

electionid

An optional unique ID of an election, found here: https://www.googleapis.com/civicinfo/v2/elections.

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

Value

Returns a list of elections, polling locations, state address info, and a normalized input of the address

Examples

1
2
3
4
## Not run: 
get_voterinfo(address = "55 e monroe, chicago, il", key = Sys.getenv("google_civic_api"))

## End(Not run)

willdebras/googlecivic documentation built on Feb. 15, 2021, 6:58 p.m.