Skip to content

Instantly share code, notes, and snippets.

@timwis
Last active January 15, 2016 11:14
Show Gist options
  • Save timwis/eec2c0f438ebc8fd67c6 to your computer and use it in GitHub Desktop.
Save timwis/eec2c0f438ebc8fd67c6 to your computer and use it in GitHub Desktop.
Callout cards VizWit config
{
"version": "2",
"header": {
"title": "Callouts",
"description": "This page demonstrates the callout feature of VizWit."
},
"cards": [
{
"x": 0,
"y": 0,
"width": 4,
"height": 2,
"vizwit": {
"title": "Tickets Issued by Police",
"chartType": "callout",
"icon": "automobile",
"provider": "socrata",
"domain": "data.phila.gov",
"dataset": "2pfz-fnns",
"groupBy": "date_trunc_y(issue_date_and_time)",
"valueFormat": "0a",
"labelFormat": "[Calendar year] YYYY",
"order": "label desc",
"link": {
"url": "?gist=601224472a5d53cbb908&file=parking-violations.json"
},
"baseFilters": [
{
"field": "issuing_agency",
"expression": {
"type": "=",
"value": "POLICE"
}
}
]
}
},
{
"x": 4,
"y": 0,
"width": 4,
"height": 2,
"vizwit": {
"title": "Average Property Value",
"chartType": "callout",
"icon": "home",
"provider": "socrata",
"domain": "data.phila.gov",
"dataset": "a67f-xaf2",
"groupBy": "year",
"valueFormat": "0a",
"labelFormat": "[Calendar year] YYYY",
"order": "year desc",
"aggregateFunction": "avg",
"aggregateField": "market_value",
"link": {
"url": "?gist=601224472a5d53cbb908&file=properties.json"
}
}
},
{
"x": 8,
"y": 0,
"width": 4,
"height": 2,
"vizwit": {
"title": "OEO Registered Vendors",
"chartType": "callout",
"icon": "briefcase",
"provider": "socrata",
"domain": "data.phila.gov",
"dataset": "ds7g-p84b",
"aggregateFunction": "count",
"valueFormat": "0,0",
"link": {
"url": "https://data.phila.gov/dataset/OEO_Registry/ds7g-p84b"
}
}
},
{
"x": 0,
"y": 3,
"width": 12,
"height": 4,
"vizwit": {
"title": "Issue Date & Time",
"description": "When the parking violation was issued",
"chartType": "datetime",
"provider": "socrata",
"domain": "data.phila.gov",
"dataset": "2pfz-fnns",
"groupBy": "date_trunc_ym(issue_date_and_time)",
"triggerField": "issue_date_and_time"
}
},
{
"x": 0,
"y": 7,
"width": 6,
"height": 2,
"vizwit": {
"title": "Code Violation Notices Issued",
"chartType": "callout",
"provider": "socrata",
"domain": "data.phila.gov",
"dataset": "icm2-sqzq",
"aggregateFunction": "sum",
"aggregateField": "fine_amount",
"groupBy": "date_trunc_y(date_added)",
"triggerField": "date_added",
"valueFormat": "$0a",
"labelFormat": "[Calendar year] YYYY",
"order": "label desc",
"link": {
"url": "https://data.phila.gov/dataset/Streets-Code-Violation-Notices/5g3z-ynfm"
}
}
},
{
"x": 6,
"y": 7,
"width": 6,
"height": 2,
"vizwit": {
"title": "Average Residential Parking Permits per District",
"chartType": "callout",
"icon": "automobile",
"provider": "socrata",
"domain": "data.phila.gov",
"dataset": "nm2v-xucf",
"aggregateFunction": "avg",
"aggregateField": "total_permits",
"valueFormat": "0,0",
"link": {
"url": "https://data.phila.gov/Transportation/Active-Residential-Parking-Permits-by-District/nm2v-xucf"
}
}
},
{
"x": 0,
"y": 11,
"width": 12,
"height": 4,
"vizwit": {
"title": "Violation Description",
"chartType": "bar",
"provider": "socrata",
"domain": "data.phila.gov",
"dataset": "2pfz-fnns",
"groupBy": "violation_description"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment