`
<div>
${indent(JSON.stringify(data, null, 2), 2)}
</div>
`
This file contains 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
import csv | |
import sys | |
import requests | |
odp_packages_url = 'https://opendataphilly.org/api/3/action/package_search?rows=10000' | |
odp_dataset_prefix = 'https://opendataphilly.org/package/' | |
socrata_keyword = '//data.phila.gov' | |
response = requests.get(odp_packages_url) |
This file contains 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":"Parking Violations", | |
"description":"This data set reflects parking violations reported by authorized agencies in Philadelphia. The data represented below is a sample of parking violations occurring between 2012-2015 with license plate numbers anonymized for privacy.", | |
"navigation":[ | |
{ | |
"label":"Download", | |
"url":"https://data.phila.gov/api/views/3bxz-a5sb/rows.csv?accessType=DOWNLOAD&bom=true" | |
} |
This file contains 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 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 widget = require('cache-element/widget') | |
const app = choo() | |
app.model({ | |
state: { | |
rows: [ {a: 'a'}, {b: 'b'} ] | |
}, |
This file contains 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 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 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 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 |
- Qualified voter registry (registered voters per ward/division)
- Voter turnout (number of voters who turned out per ward/division)