Skip to content

Instantly share code, notes, and snippets.

@timwis
Last active October 23, 2015 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timwis/a1acb910eddff964e7b3 to your computer and use it in GitHub Desktop.
Save timwis/a1acb910eddff964e7b3 to your computer and use it in GitHub Desktop.
Philadelphia Crime Incidents VizWit Config
{
"version": "2",
"header": {
"title": "Police Department",
"navigation": [
{
"label": "Download",
"url": "https://www.opendataphilly.org/dataset/crime-incidents"
}
]
},
"cards": [
{
"x": 0,
"y": 0,
"width": 4,
"height": 2,
"vizwit": {
"chartType": "callout",
"title": "Violent Crime",
"description": "Homicide, Rape, Robbery, Aggravated Assault",
"domain": "data.phila.gov",
"dataset": "r24g-zx3n",
"valueFormat": "0,0",
"labelFormat": "YYYY [Year to Date]",
"groupBy": "date_trunc_y(dispatch_date_time)",
"order": "label desc",
"baseFilters": [
{
"field": "ucr_general",
"expression": {
"type": "in",
"value": [
"100",
"200",
"300",
"400"
]
}
}
]
}
},
{
"x": 4,
"y": 0,
"width": 4,
"height": 2,
"vizwit": {
"chartType": "callout",
"title": "Property Crime",
"description": "Burglary, Theft, Motor Vehicle Theft",
"domain": "data.phila.gov",
"dataset": "r24g-zx3n",
"valueFormat": "0,0",
"labelFormat": "YYYY [Year to Date]",
"groupBy": "date_trunc_y(dispatch_date_time)",
"order": "label desc",
"baseFilters": [
{
"field": "ucr_general",
"expression": {
"type": "in",
"value": [
"500",
"600",
"700"
]
}
}
]
}
},
{
"x": 8,
"y": 0,
"width": 4,
"height": 2,
"vizwit": {
"chartType": "callout",
"title": "Part II Crime",
"description": "Simple assault, prostitution, gambling, fraud, and other non-violent offenses.",
"domain": "data.phila.gov",
"dataset": "r24g-zx3n",
"valueFormat": "0,0",
"labelFormat": "YYYY [Year to Date]",
"groupBy": "date_trunc_y(dispatch_date_time)",
"order": "label desc",
"baseFilters": [
{
"field": "ucr_general",
"expression": {
"type": "not in",
"value": [
"100",
"200",
"300",
"400",
"500",
"600",
"700"
]
}
}
]
}
},
{
"x": 0,
"y": 2,
"width": 12,
"height": 4,
"vizwit": {
"chartType": "datetime",
"title": "Reported Crime Incidents",
"domain": "data.phila.gov",
"dataset": "r24g-zx3n",
"groupBy": "date_trunc_ym(dispatch_date_time)",
"triggerField": "dispatch_date_time"
}
},
{
"x": 0,
"y": 6,
"width": 12,
"height": 4,
"vizwit": {
"chartType": "bar",
"title": "Type of Crime",
"domain": "data.phila.gov",
"dataset": "r24g-zx3n",
"groupBy": "text_general_code"
}
},
{
"x": 0,
"y": 10,
"width": 4,
"height": 4,
"vizwit": {
"title": "Arrest Made",
"chartType": "pie",
"domain": "data.cityofchicago.org",
"dataset": "6zsd-86xi",
"groupBy": "arrest"
}
},
{
"x": 4,
"y": 10,
"width": 4,
"height": 4,
"vizwit": {
"title": "Police District",
"chartType": "bar",
"domain": "data.phila.gov",
"dataset": "r24g-zx3n",
"groupBy": "dc_dist"
}
},
{
"x": 8,
"y": 10,
"width": 4,
"height": 4,
"vizwit": {
"title": "Police District",
"chartType": "choropleth",
"domain": "data.phila.gov",
"dataset": "r24g-zx3n",
"groupBy": ":@computed_region_bbgf_pidf",
"boundaries": "https://data.phila.gov/resource/bbgf-pidf.geojson?$limit=5000",
"boundariesLabel": "dist_num",
"boundariesId": "_feature_id"
}
},
{
"x": 0,
"y": 14,
"width": 12,
"height": 5,
"vizwit": {
"title": "Crime Incidents",
"chartType": "table",
"domain": "data.phila.gov",
"dataset": "r24g-zx3n"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment