Commit 0d1e32d4 authored by numeroteca's avatar numeroteca

add linea vacunas usadas en pauta completa ccaa

parent 73d64712
......@@ -13,7 +13,7 @@ caption_en <- "By: lab.montera34.com/covid19 | Data: EsCOVID19data. Check code.m
caption_provincia <- "Gráfico: @numeroteca (lab.montera34.com/covid19) | Datos: esCOVID19data (github.com/montera34/escovid19data)"
updated <- ""
# period <- "Para CCAA uniprov. casos es la suma de PCR+ y TestAc+ desde 2020.04.15"
today <- Sys.Date()
today <- Sys.Date() -1
period <- paste0("(Actualizado: ",today,")")
# filter_date <- as.Date("2021-02-18")
filter_date <- today + 1
......@@ -4773,18 +4773,23 @@ data_cases_sp_provinces %>%
geom_ribbon(aes(vac_date_last, ymin=0,
ymax=vac_dosis_administradas/poblacion*100000, group=ccaa, fill="#73986a")) +
# geom_line(aes(vac_date_last,vac_dosis_pauta_completada/poblacion*100000,group=ccaa ), size = 1 ) +
geom_line(aes(vac_date_last, y=2*vac_dosis_pauta_completada/poblacion*100000, group=ccaa, color="#186f10"), linetype ="11", size = 0.9) +
scale_color_identity(
guide = "legend",
labels = c("Vacunas dedicadas a pauta completa"),
) +
geom_ribbon(aes(vac_date_last, ymin=0,
ymax=vac_dosis_pauta_completada/poblacion*100000, group=ccaa, fill="#186f10")) +
scale_fill_identity(
guide = "legend",
labels = c("Pauta completada","Administradas","Entregadas"),
labels = c("Personas con pauta completada","Vacunas administradas","Vacunas entregadas"),
) +
facet_wrap(~ccaa) + #, scales = "free_y"
scale_color_manual(values = colors_prov) +
# scale_color_manual(values = colors_prov) +
scale_y_continuous(
limits = c(0,max(data_cases_sp_provinces$vac_dosis_entregadas)),
labels=function(x) format(round(x, digits = 0), big.mark = ".", scientific = FALSE) ) +
scale_x_date(date_breaks = "2 week",
scale_x_date(date_breaks = "1 month",
date_labels = "%d/%m",
limits=c( as.Date("2021-01-04"), max(data_cases_sp_provinces$date)),
expand = c(0,0)
......@@ -4794,7 +4799,7 @@ data_cases_sp_provinces %>%
panel.grid.minor.x = element_blank(),
panel.grid.major.x = element_blank(),
panel.grid.minor.y = element_blank(),
axis.text.x = element_text(size=12),
axis.text.x = element_text(size=10),
axis.ticks.x = element_line(color = "#888888"),
legend.position = "top"
) +
......@@ -4803,6 +4808,7 @@ data_cases_sp_provinces %>%
y = "por 100.000 habitantes",
x = "2020-2021",
fill = "",
colour = "",
caption = caption_provincia)
dev.off()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment