Skip to content

seattleio/crime.seattle.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seattle Fire Dept. 911 dispatches plotted on a map.

Part of seattle.io

This demo uses data from data.seattle.gov.

The dataset is Seattle Real Time Fire 911 Calls on data.seattle.gov. The Seattle data site uses Socrata for their dataset management, and they have a fairly easy to use api. Check out the api docs.

I used jquery to make a jsonp ajax request:

$.getJSON('http://data.seattle.gov/api/views/kzjm-xkqj/rows.json?jsonp=?&max_rows=10', function(results) { ... }

Weird thing about the jsonp request: I couldn’t find anything in any Socrata docs about jsonp, but found this example repo on somebody’s Github account. It works, so that’s cool.

The json gets plopped onto a map using Leaflet. Leaflet is crazy easy to use. Especially since they released version 0.4.

I used moment.js to turn the UNIX timestamp of each dispatch into a human readable date format.

The site is hosted using Github Pages at fire.seattle.io.

About

most recent police incident responses in seattle plotted on a map.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published