Wraps the elex tool to provide R access to Associated Press election results
A light R wrapper around the elex command
elexr provides an R interface for the elex package (http://github.com/newsdev/elex/) to load election results from the Associated Press Elections API.
Rather than reinventing the wheel, this package simply runs
a shell and loads the CSV output into a data frame. Because of this,
you'll need Python and to install elex by following the instructions at
You'll also need an API key for the API Elections API. You'll need to set
AP_API_KEY environtment variable in your R session to be able to
1 2 3 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.