Last Updated on November 8, 2018

Introduction

  • This presentation is prepared in support of the final course project for Johns Hopkins University's Developing Data Products course, which is offered on Coursera as a part of the Data Science specialization.
  • The main objective of this project is to build a Shiny app, host it online and pitch it in this short presentation.

Data

  • The data is obtained from City of Vancouver's Open Data Catalogue (Vancouver, British Columbia, Canada).
  • The dataset presents the reported crime data on a year-by-year basis beginning in 2003 released by Vancouver Police Department (VPD) which is updated every Sunday morning.
  • The dataset is downloaded everytime the app is launched to ensure the content is up to date.
  • The most current version of the dataset contains the follwing variables:
 [1] "TYPE"          "YEAR"          "MONTH"         "DAY"          
 [5] "HOUR"          "MINUTE"        "HUNDRED_BLOCK" "NEIGHBOURHOOD"
 [9] "X"             "Y"            
  • With the following number of observations reported:
[1] 580921

Exploratory Data Analysis

  • The interactive app is designed to explore the dataset and plot the reported number of crimes in the selected neighbourhood and for the selected crime type.
  • The output is the plot of crime counts for the years 2003 to 2017.
  • It also diplays the number of reported crimes for the selected neighbourhood and crime type for the current year (up to that date), similar to the example below:
library(dplyr)
data %>% filter(data$NEIGHBOURHOOD == "Central Business District" & 
                        data$TYPE == "Theft from Vehicle" &
                        data$YEAR == "2018") %>% 
             group_by(YEAR) %>% summarize(totalCrime = n())
## # A tibble: 1 x 2
##    YEAR totalCrime
##   <int>      <int>
## 1  2018       4202

Shiny App