RHays Shiny Application and Reproducible Pitch
R Hays
03032021
After creating my shiny app, now it's time to make my pitch. I get 5 slides (inclusive of the title slide) to pitch my app. I created this web page using Rstudio Presenter, with an html5 slide deck.
My presentation must satisfy the following:
It must be done in Slidify or Rstudio Presenter It must be 5 pages It must be hosted on github or Rpubs It must contained some embedded R code that gets run when slidifying the document
Based on data compiled by the CDC (dated noted on next slide), the average national homicide rate for 2019 was 6.16% per 100,000. The results of the 2020 Presidential Election allocated each state's electoral votes to one of the two political parties - Republican, Democratic.(US Archives data noted on next slide).
My shiny app will allow the user to select a State and view the following: which party was allocated the state's electoral votes what the 2019 homicide rate was for that state and the actual number of homicides
CDC Homicide Data (“https://www.cdc.gov/nchs/pressroom/sosmap/homicide_mortality/homicide.html”)
National Archives Electoral Vote Data (“https://www.archives.gov/electoral-college/2020”)
Load combined data
homiciderates <- read_excel(“C:/Users/themo/OneDrive/Data Science JHU/Shiny_APP/Homicide_vs_Electoral_Vote/Homicide Rates vs Election Results.xlsx”, col_types = c(“text”, “text”, “numeric”, “numeric”, “skip”, “skip”, “skip”, “skip”, “skip”, “skip”, “skip”),skip = 1)
Define a server for the Shiny app function(input, output) {
populate the area created for the reactive table
output$ratetable <- renderTable({
Render a reactive table
stateFilter <- subset(homiciderates, homiciderates$STATE == input$instate)
})
}
Shiny_APP location on ShinyApps: https://rhays.shinyapps.io/RHays_Homicide_Rates_vs_Electoral_Votes/
Shiny App ui.R and server.R: https://github.com/themonk99/shinyapp_project.git