GeoCO Denver Crime Presentation

  • 841 views
Uploaded 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 …

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/

More in: Education , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
841
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
4
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. GEO Colorado Denver Crime Data using CartoDB and HighCharts
  • 2. Key Points• Introduce CartoDB• Explain about CartoCSS• SQL via CartoDB APIs• Telling your story
  • 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. 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. Existing Portalhttp://denvergov.org/maps/classic/crmds
  • 6. Existing Portalhttp://denvergov.org/maps/classic/crmds
  • 7. Existing Portalhttp://denvergov.org/maps/classic/crmds
  • 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. Old vs New
  • 10. DEMOhttp://goo.gl/GiWgdhttp://www.silverbiology.com/projects/cartodb/casestudies/denvercrime/
  • 11. ResourcesCartoCSS:• http://mapbox.com/tilemill/docs/manual/carto/• http://mapbox.com/carto/latest.htmlHighCharts: http://www.highcharts.comCartoDB: http://www.cartodb.com
  • 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. 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