Giter VIP home page Giter VIP logo

crimeanalysis's Introduction

Crime Analysis

Code, Data and Analysis regarding Crime & Intelligence Analysis, some data may be from my hometown of Indianapolis, and others may be of other publicly available sources.


Repo Overview

  • /data: Data files such as incidents or extracted data from GIS ready to be moved into other applications such as Excel
  • /examples: Example analyses done
  • /scripts: Any scripts used, currently there is a Python script for extracting the incident report data from CityProtect
  • /shapefiles: Shapefiles used or created in GIS software
  • /visuals: Charts and images that may be used in the example analyses files
  • impd_analysis.qgz: My QGIS project file used for the stuff in this repo
  • Resources.md: Helpful links that I have found that I am saving for anyone else that is curious

Gathering Data

As a public citizen, I do not have access to the same level of information as actual city or public safety employees. For public use, IMPD stores crime data in CityProtect. There is a way to download bulk data from CityProtect natevely, however it misses the crucial lat & lng coordinates we need for importing into GIS software. I wrote a custom python script to use the same API the CityProtect app does to display incidents on its map.

  • Run the ./scripts/impd_incidents_retrieval.py script. Modify the begin and end dates as needed.

Importing into GIS

I use QGIS because it is free and open source. Once the data is gathered, do the following:

  • Ensure CRS is set to WGS 84 (EPSG:4326)
  • Download police beats shapefile from https://data.indy.gov/datasets/indypolicebeats/explore and import
    • Beat ED51 was invalid in QGIS so I followed the guide here to fix it. I have saved the fixed shapefile in ./shapefiles
  • Import the .csv from the PY script as a delimited text layer. Use Point Definition for Geometry and use lng as X and lat as Y.
    • The script includes categories so the dots can be recolored according to type, the parentIncidentType seems to be the best for categories.
    • Also, creating a spatial index for the point layer can help with analysis

crimeanalysis's People

Contributors

ericturner3 avatar

Stargazers

 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.