election-data
U.S. election data from the Federal Election Commission.
Currently only provides data from the 2012 U.S. presidential election.
Installation
npm install election-data
API
.candidates()
var ElectionData = ;var Election = ;Election;
Returns a list of all candidates listed on at least one state ballot (i.e., no write-ins).
.states(state)
state
string | array
var ElectionData = ;var Election = ;Election;
Returns election data for the states specified (using the state's two letter postal code (e.g., AL, CA, FL, DC). state
may be a string if only one state is specified. If invoked without state
, returns data for all states.