Code Monkey home page Code Monkey logo

crimebnb's Introduction

crimebnb

Crimebnb is a mapping demo that maps available SF Airbnb properties against local SF crime location data.

Curious about how this looks in action? Check out the demo page.

Airbnb data

A PHP script scrapes the first page of listings for San Francisco and writes them to a json file stored on the same web server.

The PHP scraper makes use of PHP Simple HTML DOM Parser by S.C. Chen.

Crime data

The crime data is provided courtesy of sanfrancisco.crimespotting.org. The index.html file includes an API call that pulls down 300 crimes between the beginning of 2010-01-01 through to 2014-10-01.

This number can easily be manipulated to pull down more crime data, however I've set it low so that the demo loads up quickly.

The following crimes were included in the data:

  • Aggravated assault
  • Murder
  • Robbery
  • Simple assualt
  • Arson
  • Burglary
  • Theft
  • Vandalism
  • Vehicle theft
  • Alcohol
  • Disturbing the peace
  • Narcotics
  • Prostitution

The crime location data is then stored in an array and a heatmap is generated using the Google Maps V3 API.

###License

MIT

###Legal & Acknowledgements

Crimebnb is in no way affiliated or condoned by Airbnb. Location listing data and the Bélo logo are the property of Airbnb.

crimebnb's People

Contributors

devinmancuso 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.