Skip to content

Commit dae12d4

Browse files
committed
Merge branch 'evolutivo_paises' of https://github.com/calejero/dashboard_cvirus into evolutivo_paises
2 parents a71d175 + 797d60c commit dae12d4

File tree

5 files changed

+23
-62
lines changed

5 files changed

+23
-62
lines changed

.gitignore

-2
This file was deleted.

load_data.R

+22-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ library(tidyverse)
55
library(leaflet)
66
library(shinydashboard)
77

8+
89
source(paste0(getwd(), "/model/generate_data.R"))
910

1011
# nos bajamos los datos, actualizados a día de ayer ----
@@ -37,7 +38,27 @@ cvirus_longer <- cvirus_longer %>%
3738
# mapa con el último dato -----
3839
## sub graphs
3940

40-
res <- GenerateCountryEvolutionData(cvirus_longer)
41+
res <- cvirus_longer %>%
42+
# filter(provincia_estado!= "Diamond Princess") %>%
43+
group_by(pais, fecha) %>%
44+
arrange(fecha) %>%
45+
arrange(-casos) %>%
46+
summarise(casos = sum(casos),
47+
Lat = first(Lat),
48+
Long = first(Long)) %>%
49+
mutate(casos_prev_day = lag(casos, n = 1, default = 0),
50+
casos_nuevos = casos - casos_prev_day) %>%
51+
filter(casos >= 5) %>%
52+
mutate(
53+
casos_nuevos = if_else(casos_nuevos==0,
54+
lag(casos_nuevos,1),
55+
casos_nuevos),
56+
dia_since_5 = row_number())
57+
58+
59+
60+
61+
4162

4263

4364
cvirus_map_data <- res %>%

model/generate_data.R

-22
This file was deleted.

server_dir/tabla_evolutivo_server.R

-34
This file was deleted.

ui.R

+1-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ sidebar <- dashboardSidebar(
2828
menuSubItem("Comparación paises", icon = icon("list-alt"),
2929
tabName = "compare_countries"),
3030
menuSubItem("Pdte", icon = icon("calendar"),
31-
tabName = "pdte"),
32-
menuSubItem("Evolutivo", icon = icon("calendar"),
33-
tabName = "Tabla_evolutivo")
31+
tabName = "pdte")
3432
),
3533
br(),
3634
br()

0 commit comments

Comments
 (0)