# # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(tidyverse) ilm=read_csv("https://www.tlu.ee/~jaagup/andmed/ilm/harkutund.txt") # Define UI for application that draws a histogram ui <- fluidPage( # Application title titlePanel("sademed vastavalt temperatuurile"), # Sidebar with a slider input for number of bins sidebarLayout( sidebarPanel( sliderInput("maxtemp", "Suurim arvestatav temperatuur:", min = -10, max = 20, value = 15) ), # Show a plot of the generated distribution mainPanel( plotOutput("distPlot") ) ) ) # Define server logic required to draw a histogram server <- function(input, output) { output$distPlot <- renderPlot({ maxTemp=input$maxtemp ilm %>% filter(TA1H% group_by(Kuu) %>% summarise(sademed=sum(PR1H)) %>% ggplot(aes(Kuu, sademed)) + geom_col() + ylim(0, 100) }) } # Run the application shinyApp(ui = ui, server = server)