Created
October 18, 2020 07:20
-
-
Save wfkwan/a9ea84b2ebe9141f777c81a837b9a15d 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
output$delay_time <- renderPlot({ | |
data <- setNames(annotate_agg2_es_result((es$search("kibana_sample_data_flights", delay_type_query))), | |
c("time", "airline", "ndelays")) | |
data$time <- as.POSIXct(data$time, format="%Y-%m-%dT%H:%M:%S") | |
data <- data[(data$time >= input$delay_time_range[1]) & (data$time <= input$delay_time_range[2]), ] | |
ggplot(data, aes(x=time, y=ndelays, fill=airline)) + geom_bar(stat="identity") + theme_minimal() | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment