9/23/2019

Overview

We have developed an RStudio Shiny application to help you be prepared for criminal activity in San Francisco. The application does the following:

  • Provides a map of criminal activity based on the user inputs
  • Provides a prediction of the next type of criminal activity based on the user inputs

The app is hosted at: https://cmbirkho.shinyapps.io/SF_Crime_App/

Application Widgets

The application uses the following widgets:

  • two instances of a selectInput
    • A field to enter the district of San Francisco the user is interested in
    • A field to enter the month the user is interested in
  • submitButton

Operations Inside the App

  • Downloads San Francisco crime data that is updated daily (data located here)
  • Renders an interactive leaflet plot based on the user inputs
  • Uses a decision tree to provide a prediction about the next type of crime in the district and month the user has selected
  • If there is not data available to render the map or make a prediction notifications on the user interface are displayed

Example of Leaflet Plot