Course Project

Barbara MAstrandrea
25/08/2017

First Slide

Overview

This was built as part of a deliverable for the course Developing Data Products as part of the Coursera Data Science Specialization.

The Shiny App developed for the first part of the assignment demo is avalilable at: https://bmastrandrea.shinyapps.io/Shiny_app_USArrests/

Source code for ui.R and server.R files are available on the GitHub repo: https://github.com/bmastrandrea/Developing-Data-Products

Slide With Description

Web Application functionality

The application provides the rate of violent crimes registered in the US in 1973. A drop down menu lets you select the type of crime (Murder, Assault, UrbanPop, Rape).

names(USArrests)
[1] "Murder"   "Assault"  "UrbanPop" "Rape"    

The chart on the right changes according to the selected one by showing the crime rate (per 100,000) for each state.

Slide With Code

Below a sample of the dataset

head(USArrests)
           Murder Assault UrbanPop Rape
Alabama      13.2     236       58 21.2
Alaska       10.0     263       48 44.5
Arizona       8.1     294       80 31.0
Arkansas      8.8     190       50 19.5
California    9.0     276       91 40.6
Colorado      7.9     204       78 38.7

and its summary

summary(USArrests)
     Murder          Assault         UrbanPop          Rape      
 Min.   : 0.800   Min.   : 45.0   Min.   :32.00   Min.   : 7.30  
 1st Qu.: 4.075   1st Qu.:109.0   1st Qu.:54.50   1st Qu.:15.07  
 Median : 7.250   Median :159.0   Median :66.00   Median :20.10  
 Mean   : 7.788   Mean   :170.8   Mean   :65.54   Mean   :21.23  
 3rd Qu.:11.250   3rd Qu.:249.0   3rd Qu.:77.75   3rd Qu.:26.18  
 Max.   :17.400   Max.   :337.0   Max.   :91.00   Max.   :46.00  

Slide With Plot

Multiple histograms that show the rate for each crime

plot of chunk unnamed-chunk-4