0.0.51 • Published 6 years ago

election-data v0.0.51

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

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 = require('election-data');
var Election = new ElectionData();
Election.candidates();

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 = require('election-data');
var Election = new ElectionData();
Election.states(['AL', 'CA', 'FL']);

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.

0.0.51

6 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago