GEO Colorado Denver Crime Data using CartoDB and HighCharts
Key Points•   Introduce CartoDB•   Explain about CartoCSS•   SQL via CartoDB APIs•   Telling your story
CartoDB• Geospatial mapping• Data stored in the cloud• PostGIS engine• Supports CartoCSS• SQL API• Leaflet and Google Maps...
Denver Crime Online PortalGoal: To create an interactive map to view the Denver crime data and to do it in less than a day...
Existing Portalhttp://denvergov.org/maps/classic/crmds
Existing Portalhttp://denvergov.org/maps/classic/crmds
Existing Portalhttp://denvergov.org/maps/classic/crmds
Data & SoftwareDenver Open Data Catalog•Shapefiles Used•    http://data.denvergov.org/dataset/city-and-county-of-denver-cr...
Old vs New
DEMOhttp://goo.gl/GiWgdhttp://www.silverbiology.com/projects/cartodb/casestudies/denvercrime/
ResourcesCartoCSS:•   http://mapbox.com/tilemill/docs/manual/carto/•   http://mapbox.com/carto/latest.htmlHighCharts: http...
CartoCSS@c:offense_ca;                   [@c="robbery"]{                                                                  ...
SQL for Pie ChartSELECTcount(*) as sz,count(*)::float/(SELECT count(*) FROM crime WHERE   neighborho = baker )*100 as perc...
Upcoming SlideShare
Loading in...5
×

GeoCO Denver Crime Presentation

984

Published on

This is the presentation given at the Denver http://www.meetup.com/geo-co meetup. We explain a bit of how we used open data to create an interactive map.

http://silverbiology.com/projects/cartodb/casestudies/denvercrime/

Published in: Education, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
984
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

GeoCO Denver Crime Presentation

  1. 1. GEO Colorado Denver Crime Data using CartoDB and HighCharts
  2. 2. Key Points• Introduce CartoDB• Explain about CartoCSS• SQL via CartoDB APIs• Telling your story
  3. 3. CartoDB• Geospatial mapping• Data stored in the cloud• PostGIS engine• Supports CartoCSS• SQL API• Leaflet and Google Maps Libraries• Graphical Editor for Point & Polygons• Lots of Examples• Free 5MB account• FAST!!!www.cartodb.com
  4. 4. Denver Crime Online PortalGoal: To create an interactive map to view the Denver crime data and to do it in less than a day.Requirements:• Use open data• Use open source software• Real Time Interaction• Enjoyable to users• Make it informative and Fast!!!
  5. 5. Existing Portalhttp://denvergov.org/maps/classic/crmds
  6. 6. Existing Portalhttp://denvergov.org/maps/classic/crmds
  7. 7. Existing Portalhttp://denvergov.org/maps/classic/crmds
  8. 8. Data & SoftwareDenver Open Data Catalog•Shapefiles Used• http://data.denvergov.org/dataset/city-and-county-of-denver-crime http://data.denvergov.org/dataset/city-and-county-of-denver-police-districts•Software Used• HTML, JavaScript, CSS• jQuery• CartoDB, Leaflet, CloudMade Tiles HighCharts
  9. 9. Old vs New
  10. 10. DEMOhttp://goo.gl/GiWgdhttp://www.silverbiology.com/projects/cartodb/casestudies/denvercrime/
  11. 11. ResourcesCartoCSS:• http://mapbox.com/tilemill/docs/manual/carto/• http://mapbox.com/carto/latest.htmlHighCharts: http://www.highcharts.comCartoDB: http://www.cartodb.com
  12. 12. CartoCSS@c:offense_ca; [@c="robbery"]{ [@c="auto-theft"]{ #crime{ marker-fill:#BAB86C marker-fill:#232323 marker-fill:#AA2143; } } marker-width:1; [@c="burglary"]{ } marker-line-color:#999; marker-fill:#1CAC78 #crime[zoom>12]{ marker-line-width:0; } marker-width:2; marker-opacity:1; [@c="murder"]{ } marker-line-opacity:1; marker-fill:#CD4A4A #crime[zoom>14]{ marker-placement:point; } marker-line-width:1; marker-type:ellipse; [@c="theft-from-motor-vehicle"]{ marker-width:3; marker-allow-overlap:true; marker-fill:#ADADD6 } [@c="larceny"]{ } #crime[zoom>16]{ marker-fill:#FDFC74 [@c="arson"]{ marker-line-width:1;} marker-fill:#FF7538 marker-width:5;[@c="white-collar-crime"]{ } } marker-fill:#EDEDED [@c="other-crimes-against-persons"]{} marker-fill:#FF48D0[@c="drug-alcohol"]{ } marker-fill:#1974D2 [@c="public-disorder"]{} marker-fill:#DBD7D2[@c="aggravated-assault"]{ } marker-fill:#C364C5 [@c="all-other-crimes"]{} marker-fill:#95918C }
  13. 13. SQL for Pie ChartSELECTcount(*) as sz,count(*)::float/(SELECT count(*) FROM crime WHERE neighborho = baker )*100 as percent,c.offense_caFROM denverhoods dhJOIN crime c ON c.neighborho=dh.neighborhoWHERE c.neighborho = bakerGROUP BY c.offense_caORDER BY sz DESC
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×