Coder Social home page Coder Social logo

avivyaish / crimeandweatherinchicago Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 33.8 MB

A project exploring the relationship between crime and weather in Chicago.

Python 0.08% JavaScript 0.01% HTML 92.63% Makefile 0.01% Jupyter Notebook 7.28% CSS 0.01% Smarty 0.01%
python visualization machine-learning data-science dataset

crimeandweatherinchicago's Introduction

Crime and Weather in Chicago

Authors: Aviv Yaish, David Barda, Yuval Shavit

A project exploring the relationship between crime and weather in Chicago.

Crime.and.Weather.in.Chicago.-.demonstration.of.our.visualizations.and.tools.mp4

Installation and Usage

  1. Install libraries:

    a. Install Anaconda 4.3.0:

     https://www.continuum.io/downloads
    

    b. Install folium 0.3:

     https://github.com/python-visualization/folium
    

    c. Install branca:

     pip install branca
    

    d. Install pyowm:

     pip install pyowm
    
  2. Make sure you have the datasets:

    a. Crime dataset:

     Export as CSV from:
    
         https://data.cityofchicago.org/Public-Safety/Crimes-2001-to-present/ijzp-q8t2
    
     Put in:
    
         ./data/crime_data_original.csv
    

    b. Weather dataset:

     Requires authorization from NOAA.
    
     Put in:
    
         ./data/weather_data.csv
    
  3. Prepare the data:

     python prepare_data.py
    
  4. Visualizations:

    a. Make sure this folder exists:

     ./static/maps
    

    b. Create the map visualizations:

     python viz.py
    

    c. Now you can access the heatmap in:

     ./static/heatmap.html
    
  5. Crime prediction:

    a. Create the crime predictor:

     python machine_learning.py
    

    b. Run the server:

     python server.py
    

    c. Now you can access the crime predictor in:

     http://localhost:3000/predict.html
    
  6. The index (including the PDF) is in:

     http://localhost:3000/index.html
    

Acknowledgments

The City of Chicago Data Portal for publishing their data.

NOAA, for giving us access to their weather data.

The creators of Anaconda, folium, scikit, numpy, and all the other libraries we used, for producing excellent and useful libraries.

crimeandweatherinchicago's People

Contributors

avivyaish avatar

Stargazers

 avatar

Watchers

 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.