Skip to content

Instantly share code, notes, and snippets.

@timwis
Last active December 27, 2016 19:59
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/39c8e1fd5639db1f752298baf3450fb4 to your computer and use it in GitHub Desktop.
Save timwis/39c8e1fd5639db1f752298baf3450fb4 to your computer and use it in GitHub Desktop.
VizWit - Carto - Philadelphia Crime Incidents
{
"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": ""
}
]
},
"cards": [
{
"x": 0,
"y": 0,
"width": 12,
"height": 5,
"vizwit": {
"title": "Dispatch Date",
"description": "The date and time that the officer was dispatched to the scene.",
"chartType": "datetime",
"provider": "carto",
"domain": "timwis.carto.com",
"dataset": "crimes_2015_to_oct_2016",
"groupBy": "date_trunc('month', dispatch_date)",
"triggerField": "dispatch_date"
}
},
{
"x": 0,
"y": 5,
"width": 6,
"height": 4,
"vizwit": {
"title": "Police District",
"chartType": "pie",
"provider": "carto",
"domain": "timwis.carto.com",
"dataset": "crimes_2015_to_oct_2016",
"groupBy": "dc_dist"
}
},
{
"x": 4,
"y": 5,
"width": 6,
"height": 4,
"vizwit": {
"title": "Police Districts",
"chartType": "choropleth",
"provider": "carto",
"domain": "timwis.carto.com",
"dataset": "crimes_2015_to_oct_2016",
"groupBy": "dc_dist",
"boundaries": "https://timwis.carto.com/api/v2/sql?q=select+*+from+public.police_district_boundaries&format=geojson",
"boundariesLabel": "dist_num",
"boundariesId": "dist_numc"
}
},
{
"x": 0,
"y": 9,
"width": 12,
"height": 5,
"vizwit": {
"title": "General Crime Category",
"description": "The generalized text for the crime code",
"chartType": "bar",
"provider": "carto",
"domain": "timwis.carto.com",
"dataset": "crimes_2015_to_oct_2016",
"groupBy": "text_general_code"
}
},
{
"x": 0,
"y": 14,
"width": 12,
"height": 7,
"vizwit": {
"title": "Crime Incidents",
"chartType": "table",
"provider": "carto",
"domain": "timwis.carto.com",
"dataset": "crimes_2015_to_oct_2016",
"columnsToHide": [
"cartodb_id",
"the_geom",
"the_geom_webmercator"
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment