Giter Site home page Giter Site logo

peterbreen / fire.seattle.io Goto Github PK

View Code? Open in Web Editor NEW

This project forked from seattleio/fire.seattle.io

0.0 2.0 0.0 188 KB

displays most recent fire department responses on a map. consumes data from socrata and uses leaflet for the map.

Home Page: http://fire.seattle.io

CSS 7.88% HTML 2.40% JavaScript 89.72%

fire.seattle.io's Introduction

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.

fire.seattle.io's People

Contributors

mapmeld avatar marks avatar modulitos avatar sethvincent avatar zmbc avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.