A static website using New Orleans Police Department Stop & Search data from data.nola.gov.
This project is currently under development. All results should be considered unreliable.
See a preview here, or follow the instructions below to create a copy of the website from your own computer.
This project contains two different tech stacks. The data analysis was done using R to generate Plotly compatible JSON. That JSON is then consumed by a React website built with GatsbyJS in order to display graphs on a website.
The top level directory corresponds to the React website. Data analysis code i in the R/
directory.
git clone https://github.com/marvinmarnold/oipm_stop_search
- Download the most recent Stop and Search data here.
- Select 'Export' -> 'CSV' (not Excel version).
- The file is currently over 150MB. It will take some time to download.
- Move and rename the file from its downloaded location to
oipm_stop_search/R/src_data/StopSearch.csv
.
Download Gatsby to build the website. Download R to explore the data.
- Data analysis was written in R with R Studio.
- Website written with React and compiled with Gatsby.
- Visualizations using Plotly
- Mapbox for Maps.
cd oipm_stop_search
gatsby serve
Open up your browser at localhost:8000
TODO How to install them
install.packages("devtools")
devtools::install_github('marvinmarnold/roipm')
install.packages("dplyr")
install.packages("tidyr")
install.packages("plotly")
install.packages("anytime")
install.packages("leaflet")
Add this line to your ~/.bashrc
file: export STOP_SEARCH_DIR=/PATH/TO/PROJECT/oipm_stop_search/R
The main entry point to all data analysis is in R/stop_search.R
. To execute all the analysis, run the code below.
cd oipm_stop_search
Rscript R/stop_search.R