Giter Site home page Giter Site logo

crimedataanalysis's Introduction

CrimeDataAnalysis

Repo for INRUG experiments using crime data.

INRUG members are working on a project to see what sort of conclusions can be drawn from public GIS and crime data from Spokane Washington.

The data can be found at https://static.spokanecity.org/download/gistransfer/pubdata/Crime.zip

Supporting data can be found at https://my.spokanecity.org/opendata/gis/data/

There is also a website called "CrimeWatch" that seems to have a lot of data, but we do not know if it is accessible right now (or if we even need it).

The NACJD National Archive of Criminal Justice Data maintains copies of NIBRS data files from 2010-2014. However, only a few agencies in Spokane County submit the incident-level NIBRS data.

Questions

Some possible questions with the dataset we agreed on include:

  • Looking at Crime in zipcodes over time, does crime get worse before it get better?
  • Do we have legit sample sizes?
  • Do we have the granularity we will need to develop hypotheses?
  • What is the relationship between crime rate and marijuana legalization?
  • Are there distance (spatial) effects with crime rate and dispensaries?
  • What effect does building and population growth have on crime in different zipcodes (gentrification)?
  • Can we build an effect parameter that might inform more accurate taxation on companies regarding indirect community costs of building and growth?
  • Is response time to an incident predictable?
  • How is a communities demographics related to crime types and rates?
  • What are crime rate trends over time? Are they stable?
  • How predictable are crime rates at specific periods of time (by month)?
  • Can we do some sort of time series analysis (ie ARIMA)

Getting Started

First, make sure you fork the project on Github

Clone the project in RStudio. After you make your additions and changes, make sure to push them back to your repository.

When you are ready to share something with the group, send a 'Pull Request' in Github to Joe, who will merge your changes with the original project. We can then update our 'forked' repos from the original project.

If you need help getting RStudio and git installed, the Using Version Control with RStudio tutorial will help.

Using sub-folders

In order to keep things organized, please create a sub-folder for each analysis or sub-project. These will hold all the R scripts, .Rmarkdown files and any other rendered reports used in your analysis. The final analysis should be rendered as an html_document within each sub-folder.

Data files should be kept in a /Data folder under the repository's top folder. This will facilitate using the same data files. The /Data folder and contents are listed in the .gitignore file, which prevents them from appearing in the GitHub repository.

Publishing an HTML report

The project has a web site located at https://JoeDumoulin.github.io/CrimeDataAnalysis/. The site pages are built using the new render_site() functionality in RStudio Preview (1.0+). More information is available on the R Markdown Websites page.

Links to your analysis can be added to the project page by:

  1. Adding a link yourself. Just edit the 'Index.Rmd' file located in the repository root folder. Then use the render_site() function to re-build the index.html file. Send a pull request to Joe to merge your changes. This requires RStudio 1.0+ or higher.

  2. Posting an issue to the main project repository. One of the team members with a newer version of RStudio can then add the link for you.

crimedataanalysis's People

Contributors

ckogan avatar glennrdoherty avatar joedumoulin avatar kmagori avatar rparrish avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

crimedataanalysis's Issues

Set up project web page

Although there are a few ways to do this, the most straight-forward option for this project would be to set the master branch as the publishing source.

Since each analysis or sub-project will have it's own folder anyway, any .html files can be rendered there without having to merge or move them to another folder. The index.html file in the repository's top level will just need links added.

Convert x y coordinates to lat long in Crime data frame

Kristian - can you help convert the x y coordinates in the Crime data to latitudes and longitudes? We're trying to use spTransform() from the rgdal package but not sure how to do that.

If you can update the basecode.R script to add those columns, that would be great.

Thanks!

Crime Data Group Meeting October 15th, 2016

Hi Team,
Today we agreed on a Folder Structure to simplify our Repo workflow. In our project root folder (CrimeDataAnalysis) we should have HTML, RMD files. Other folders in the root should include a Data folder (.csv, xls., etc) and a R folder (*.R).

The coordinate data we have is good. But the Lat/Lng data is too high level. So, we took the coordinate data and re-calculated the Lat/Lng data. In the file get_spokane_crimedata.Rmd, we removed incorrect coordinates, transformed lcc coordinates into lat/lng and removed old lat/lng, created a DF with both LCC coordinates and new lat/lng. Finally, we exported .csv into the Data folder.

Klark's commit will close this Issue.

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.