<commit_before>library(shiny)

shinyServer(
server <- function(input, output) {
  
  output$dolg <- renderPlot({
  ggplot(podatki1 %>% filter(Cas == input$leto_1), aes(x = Drzava, y = Dolg, fill=Dolg)) + 
  scale_fill_continuous(low = "#69b8f6", high = "#142d45") + 
  geom_bar(stat ="identity") + 
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5)) +
  ggtitle("Zadolženost evropskih držav") +
  ylim(0, 190)})
  
  
  output$deficit <- renderPlot({
  ggplot(podatki2 %>% filter(Cas == input$leto_2), aes(x = Drzava, 
  y = Deficit, fill=Deficit)) + 
  geom_bar(stat ="identity") + 
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5)) + 
  ggtitle("Zadolženost evropskih držav") +
  ylim(-33, 6)})
  
  
  output$zemljevid <- renderPlot({ggplot(origin %>% filter(GEO %in% input$countries),
                                      aes(x=CITIZEN,y=applicants,fill=GEO,color=GEO))+ 
      geom_bar(stat="identity",position=position_dodge())+
      theme(axis.text.x = element_text(angle = 70, vjust = 0.5))+
      ggtitle(paste0("Origin of asylum seekers"))+xlab("")+ylab("") })
  output$prediction <- renderPlot({ggplot(tidy_Prosnje2015 %>% filter(ASYL_APP == "Asylum applicant",GEO %in% input$countries) %>%
                                            mutate(applicants=Value+Value*(0.15*input$weather+0.7*input$conditions+0.15*input$war)),
                                          aes(x=MONTH,y=applicants,group=GEO,color=GEO))+geom_smooth(method = "loess")+
      xlab("")+ylab("")+
      ggtitle("Predictions of migrant flows")})
}
)<commit_msg>Update server.r<commit_after>library(shiny)

shinyServer(
server <- function(input, output) {
  
  output$dolg <- renderPlot({
  ggplot(podatki1 %>% filter(Cas == input$leto_1), aes(x = Drzava, y = Dolg, fill=Dolg)) + 
  scale_fill_continuous(low = "#69b8f6", high = "#142d45") + 
  geom_bar(stat ="identity") + 
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5)) +
  ggtitle("Zadolženost evropskih držav") +
  ylim(0, 190)})
  
  
  output$deficit <- renderPlot({
  ggplot(podatki2 %>% filter(Cas == input$leto_2), aes(x = Drzava, 
  y = Deficit, fill=Deficit)) + 
  geom_bar(stat ="identity") + 
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5)) + 
  ggtitle("Deficit evropskih držav") +
  ylim(-33, 6)})
  
  
  output$zemljevid <- renderPlot({
  Dolg <- filter(podatki1, Cas == input$leto_3)
  m1 <- match(svet$adm0_a3, Dolg$Drzava)
  svet$Dolg <- Dolg$Dolg[m1]
  evropa <- pretvori.zemljevid(svet, svet$continent == "Europe")
  ggplot() + geom_polygon(data = evropa, aes(x=long, y=lat, group = group, fill = Dolg), color = "grey") + 
  xlim(-10, 50) + ylim(34, 72) + scale_fill_continuous(low = "#69b8f6", high = "#142d45",limits = c(0, 200)) + 
  xlab("") + ylab("") + ggtitle("Zemljevid zadolženosti evropskih držav")})
}
)
{'fraction_non_alphanumeric': 0.17855875044373448, 'fraction_numerical': 0.03549875754348598, 'mean_word_length': 3.792517006802721, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1014693', 'n_tokens_mistral': 1252, 'n_tokens_neox': 1117, 'n_words': 180}