- Qualified voter registry (registered voters per ward/division)
- Voter turnout (number of voters who turned out per ward/division)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function reorder (state, data) { | |
const { from, to } = data | |
const rowsCopy = state.rows.slice() | |
const fromRowCopy = rowsCopy[from.row].slice() | |
const item = fromRowCopy[from.index] | |
fromRowCopy.splice(from.index, 1) // remove from row | |
rowsCopy[from.row] = fromRowCopy // replace 'from' row |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.use({ | |
wrapEffects: (cb) => { | |
return async (state, data, send, done) => { | |
const psend = promisify(send) | |
try { | |
await cb(state, data, psend) | |
done() | |
} catch (err) { | |
done(err) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2", | |
"header": { | |
"title": "Crime Incidents 2015 - October 2016", | |
"description": "Philadelphia Police Department crime incidents from calendar year 2006 to present, including Part I and Part II crimes. UCR codes are generalized and incident locations are rounded to the hundred block. These counts may not coincide exactly with data that is submitted to the Uniformed Crime Reporting (UCR) system.", | |
"navigation": [ | |
{ | |
"label": "Download", | |
"url": "" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WARD | DISTRICT | NAME | PARTY | TYPE | |
---|---|---|---|---|---|
01 | 01 | LINDA SAMACICIA | Democrat | M | |
01 | 02 | BEATRIZ P BORODIAK | Democrat | M | |
01 | 03 | MILLICENT BADIE | Democrat | M | |
01 | 04 | DARNELL HELEM | Democrat | M | |
01 | 06 | KERNARD M SHEARLDS | Democrat | M | |
01 | 07 | AIDA L RIBOT | Democrat | M | |
01 | 08 | CECILY C KIHN | Democrat | M | |
01 | 10 | LARNEY J REED | Democrat | M | |
01 | 12 | SYLVIA A HARKER | Democrat | M |
| ward | registered_total | registered_democratic | registered_republican | turnout_total | turnout_democratic | turnout_republican | turnout_pct_total | turnout_pct_democratic | turnout_pct_republican | |------|------|------|------|------|------|------|------|------|------|------|------|------|------|------| | 1 | | 66A |
| ward | party | registered_total | registered_party | turnout_total | turnout_party | turnout_pct_total | turnout_pct_party |
First, fetch the published file and prepare it for comparison
# Fetch file
curl 'https://data.phila.gov/resource/6quj-54t7.csv?$limit=5000' | \
# Fix currency formatting
sed -E 's/,\$([0-9]+)\.00/,\1/g' | \
# Sort
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Vacant Property Indicators: 2016-11-14T17:46:54.215540" | |
"Greenworks Dashboard: 2016-11-10T05:47:25.073084" | |
"Licenses and Inspections Trade Licenses: 2016-09-22T21:15:57.272811" | |
"Licenses and Inspections Business Licenses: 2016-09-22T21:14:38.869844" | |
"Licenses and Inspections Clean and Seal: 2016-09-22T18:07:28.682465" | |
"Licenses and Inspections: Inspections Data: 2016-09-22T16:17:08.376879" | |
"Licenses and Inspections Commercial Activity Licenses: 2016-09-22T15:36:26.156628" | |
"Licenses and Inspections Service Requests: 2016-09-22T14:31:12.542396" | |
"Licenses and Inspections Appeals of Code Violations and Permit Refusals: 2016-09-22T14:01:30.276425" | |
"DVRPC Freight Rail: 2016-08-16T13:52:59.204610" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const choo = require('choo') | |
const html = require('choo/html') | |
const app = choo() | |
app.model({ | |
state: {}, | |
reducers: { | |
receive: (data, state) => ({}) | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const style = require('typestyle').style | |
const html = require('bel') | |
const className = style({ | |
height: '125px', | |
position: 'relative', | |
backgroundColor: '#d4d4d4', | |
'&:after': { | |
content: '"+"', | |
fontSize: '550%', |