Skip to content

paupereira/portland

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forecasting Crime in Portland

Creating our analysis data sets

Required packages: rvest, data.table, foreign, zoo, sp, rgeos, maptools, rgdal

  1. Run data_download.R to scrape the NIJ website for links to all .zip files and download them into ./data.

  2. Run crimes_to_csv.R to convert these shapefiles' .dbf databases into our analysis .csv files: crimes_all.csv, crimes_bur.csv, crimes_str.csv and crimes_veh.csv.

  3. Make sure you have the provided Portland_Police_Districts.shp shapefile of police districts in Portland in ./data, then run extract_portland_boundary_to_csv.R to create a text file containing all x-y coordinates of the (500-ft-buffered) vertices of the outer boundary of Portland into ./data/portland_coords.csv.

Converting chosen parameters into output shapefiles

  • competition_output.R takes all the parameters as input and outputs one shapefile (.shp, .dbf, .prj, and .shx) in the appropriate place in the submissions folder (one crime type/horizon combination per run of competition_output.R).

About

Forecasting Crime in Portland

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •