My Shiny Final App

Todd Rimes
2018-05-18

Overview

The idea for this Shiny app stemmed from the discovery of this dataset: https://www.healthdata.gov/harvest_source/datacdcgov. My initial plan was to enable comparison in-state between 1 COD and ALL COD's, as well as between one state and the whole country or New York City. However, the issue of plotting different datasets at different scales on a single canvas proved to be more work than the time allowed. These will be added in the future.

  • Works: Compare State 1 to State 2 on 1 COD
  • Planned: Compare State 1, 1 COD, to State 1 all deaths (scaling problem)
  • Planned: Compare State 1, 1 COD, to USA, same COD (scaling problem)

Code and Sample Plot

if(nrow(d4)>0){
        ggplot(d4, aes(x=date, y=count, group=paste(state,label), color=state)) +
                geom_path() +
                geom_point() +
                labs(title = type1) +
                ylab(customYLabel) + 
                xlab("Year/Month") + 
                ylim(0, 1.25*max(d4$count)) +
                theme(
                        axis.title.y = element_text(color = "black"),
                        axis.text.y = element_text(color = "black"),
                        axis.title.y.right = element_text(color = "black"),
                        axis.text.y.right = element_text(color = "black"),
                        axis.text.x = element_text(angle = 90, hjust = 1)
                )
}

Sample Plot

plot of chunk unnamed-chunk-3

Links to Github and hosted Shiny App