This gist contains the maps for Philadelphia Council, Wards, and ward subdivisions (precincts).
- City Council (2016) aka
Council_Districts_2016.geojson - Ward Divisions (2014) aka
Political_Divisions.geojson - Wards (2014) aka
Political_Wards.geojson
| import errno, os, csv | |
| """ | |
| the pattern is that when a line starts with "County" | |
| the next line defines the length of a vector | |
| record the matrix | |
| when a line starts with totals, start looking for a county line | |
| dfa: | |
| lfc | |
| first line |
| "" | |
| County,Registered Voters,Ballots Cast,Voter Turnout, | |
| ALEPPO,1369,223,16.29% | |
| ASPINWALL DIST 1,885,174,19.66% | |
| ASPINWALL DIST 2,607,133,21.91% | |
| ASPINWALL DIST 3,872,182,20.87% | |
| AVALON WARD 1,1122,117,10.43% | |
| AVALON WARD 2 DIST 1,721,110,15.26% | |
| AVALON WARD 2 DIST 2,476,69,14.50% | |
| AVALON WARD 3 DIST 1,329,42,12.77% |
| # Allegheny County Wards and Districts |
This gist contains the maps for Philadelphia Council, Wards, and ward subdivisions (precincts).
Council_Districts_2016.geojsonPolitical_Divisions.geojsonPolitical_Wards.geojson| #!/usr/bin/env python3 | |
| """ | |
| This script is useful only for csv files with no fields containing special or | |
| escaped characters in the first NUM_TRIVIAL_FIELDS fields. | |
| Otherwise, the in[put]line.split(",") will break, and is a bad idea. | |
| this script produces a file which can be imported into mysql with: | |
| LOAD DATA LOCAL INFILE 'out.csv' INTO TABLE my_existing_table |
| -- put "new" data with the rest of the reach data | |
| select | |
| matches.IDNumber, | |
| reach_data.ReachID, | |
| reach_data.AddedTimestamp, | |
| reach_data.LastReachedTimestamp, | |
| reach_data.LastReachedbyUserName, | |
| reach_data.AutoAppliedTag, | |
| reach_data.CampaignTags, | |
| reach_data.FirstName, |