Pablo-source / Shiny-app-using-COVID-data

Basic bootstrap shiny app including leaflet maps, plots and dt tables. Updating app in 2024 with data from CSSEGITandData repo
3 stars 1 forks source link

Add Interactive data table below map and time slider bar #18

Closed Pablo-source closed 2 weeks ago

Pablo-source commented 2 weeks ago

Implement in the next design iteration the following three features in the existing Shiny Dashboard:

Read first about the latest Issue I closed on the 30th August 2024 https://github.com/Pablo-source/Shiny-app-using-COVID-data/issues/16

  1. Using {plotly} library, create a bar chart of total deaths rate by country in descending order, following this script I have used in previous Shiny apps:

      output$ToptenDEATH = renderPlotly({
      Tabledesc1 <- POP_POPULATED  %>%
       select(Death,Country,date) %>% 
       mutate(Max_date = max(POP_POPULATED$date)) %>% 
       mutate(Flag_max_date = ifelse(Max_date == date,1,0)) %>% 
    filter(Flag_max_date==1) %>% 
    arrange(desc(Death)) %>% 
    group_by(date) %>% 
    slice(1:10) %>% 
    ungroup()
    
    TabledesC <- Tabledesc1 %>% 
       arrange(Death)
     Top10_D <- data.frame(TabledesC,stringsAsFactors = FALSE)
     Top10_D$Country <- factor(Top10_D$Country, 
                            levels = unique(Top10_D$Country)[order(Top10_D$Death, decreasing = FALSE)])

    Barplot top 10 countries sorted by CONFIRMED cases

       plot_ly(Top10_D, x = ~Death, y = ~Country,
                  type = 'bar', orientation = 'h')%>%
                   layout(title=paste0("Top 10 countries Covid19 Deaths")) })
  2. Also include a table with Confirmed, Recovered and Death rates by country, linked to the animated slider imput

     fluidRow(box(dataTableOutput("mytable"), width = 15)
  1. Finally, remember to add a legend to the existing Leaflet map built on the previous design iteration.
  1. Review set of files created by {renv} library created on the previous closed issue
Pablo-source commented 2 weeks ago

Closed issue as this has been addressed on pull request 19

https://github.com/Pablo-source/Shiny-app-using-COVID-data/pull/19