Created
August 4, 2016 15:46
-
-
Save ckholmes5/1e1ad19cfa58f3d1fba6611a7fa6e91e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
graphInput = reactive({ | |
if (input$lineG == "total") { | |
line = total_fatal | |
} | |
if (input$lineG == 'drunk') { | |
line = dd_fatal | |
} | |
if (input$lineG == 'distract') { | |
line = distract_fatal | |
} | |
if (input$lineG == 'speeding') { | |
line = speeding_fatal | |
} | |
line = line[line$YEAR >= input$lineRange[1] & line$YEAR <= input$lineRange[2],] | |
}) | |
output$trendPlot = renderPlotly({ | |
p = plot_ly(graphInput(), x = YEAR, y = FATALS) | |
layout(p, yaxis = list(range = c(0, 50000)),autotick = F) | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment