datadesk / python-elections

A Python wrapper for the Associated Press' U.S. election data service.
python-elections.rtfd.org
176 stars 49 forks source link

Calculating electoral votes #65

Closed eads closed 11 years ago

eads commented 11 years ago

I'm filtering top of the ticket for president and looking at the state-level results:

national = client.get_topofticket()
delaware = national.filter_races(office_name='President')[0].state

It appears the results do not include electoral votes and I'll need to derive them. Is that correct or am I looking in all the wrong places? Would this be something useful to add to the library?

schwanksta commented 11 years ago

@eads We're outfitting the lib with that and county-by-county reporting right now, but we haven't gotten to electoral college votes yet. If you want to get a jump on it, that would be awesome. Unfortunately it's the first time we're getting GE results with the library, so it's all fresh and new again.

palewire commented 11 years ago

Ken's right. Sorry we're not more ahead of the game, but AP data just landed this week. Also, the fixes we've made so far are only in trunk and haven't been released, so pip installations aren't ready yet.

eads commented 11 years ago

No need to apologize! I'm trying to get into the elections library so we can help contribute what we can to it, and also to know where we'll need to mock data for our results visualizations and where we have something loadable.

I'm running the trunk version with our election center rig.