CodeForPhilly / philly-ward-leaders

The players behind elections
https://www.phillywardleaders.com
MIT License
17 stars 11 forks source link

Add party-based performance from last general election #64

Open timwis opened 9 years ago

timwis commented 9 years ago

While knowing who they actually endorsed in the primary would allow the strongest indicator of performance (when compared against election results), we can at least assume the democrats endorsed the democrats in the general election in the meantime.

Easiest way to do this

  1. Visit BallotBoxApp
  2. Select 2014 General and Governor and Lieutenant Governor
  3. Select Ward 1
  4. Copy the % for the democratic candidate into the democratic ward leader's Results column and the % for the republican candidate into the republican ward leader's column in the spreadsheet
  5. Repeat for the other wards (there are 66)
pwolanin commented 2 years ago

I seems like the data on https://www.philadelphiavotes.com/en/resources-a-data/ballot-box-app.html Is now just provided as spreadsheets.

We should define a process for updating the various stats automatically from those (after converting to CSV probably).

timwis commented 2 years ago

If helpful, you could use a Python library to convert xlsx to csv as part of a data script, or use a separate tool like csvkit to convert it before passing it to your script.

pwolanin commented 2 years ago

It's easy enough to use excel or open office to convert to csv, especially since this is infrequent. I think a data script to pull out the values would be more important.