EJERCICIO Utilizando la información brindada por la Secretaria de Salud Federal sobre los casos de COVID-19 detectados en la República Mexicana, y considerando solamente los casos positivos (verificar que la información que se obtenga de la base de datos sea igual a la reportada diariamente por dicha secretaría), obtener lo siguiente.
# Librerías
library(dplyr)
library(tidyr)
library(ggplot2)
library(plotly)
library(leaflet)Datos
Lectura
Se cargan la base de datos de casos de Covid-19 en México con última actualización el 15 de Diciembre de 2021 y con últimas fechas de registro del 12 y 14 de Diciembre de 2021 para las defunciones y casos positivos respectivamente. También se cargan los diccionarios correspondientes a los municipios y entidades de la república mexicana.
# Lectura ----
# Datos
covid_data_raw <- readr::read_csv(here::here("./data/raw/211215COVID19MEXICO.csv")) %>%
janitor::clean_names() %>%
select(fecha_actualizacion, entidad_res, municipio_res, fecha_ingreso, fecha_def, sexo, clasificacion_final, diabetes:tabaquismo)
# Diccionarios
dicc_entidades <- readxl::read_xlsx(here::here("./data/raw/201128 Catalogos.xlsx"), sheet = "Catálogo de ENTIDADES") %>%
janitor::clean_names()
dicc_municipios_yuc <- readxl::read_xlsx(here::here("./data/raw/201128 Catalogos.xlsx"), sheet = "Catálogo MUNICIPIOS") %>%
janitor::clean_names() %>%
filter(clave_entidad == dicc_entidades$clave_entidad[which(dicc_entidades$entidad_federativa == "YUCATÁN")]) %>%
select(clave_municipio, municipio)Limpieza
El estado elegido es Yucatán, el cual cuenta con 106 municipios.
Se utilizan los diccionarios de entidades y municipios para filtrar la base de datos nacional.
# Limpieza ----
# Se filtra por el estado de Yucatán
covid_data_yuc <- covid_data_raw %>%
filter(entidad_res == dicc_entidades$clave_entidad[which(dicc_entidades$entidad_federativa == "YUCATÁN")]) %>%
mutate(sexo = ifelse(sexo == 1, "Mujer", "Hombre"))
# Merge nombres de municipios con datos covid
covid_data_yuc <- inner_join(covid_data_yuc,
dicc_municipios_yuc,
by = c("municipio_res" = "clave_municipio"))
# Se libera espacio
rm(covid_data_raw)1. Eligiendo un estado de la república que tenga más de 20 municipios, obtener (tablas):
1. (5%) % de defunciones por municipio (total de defunciones / total de casos positivos).
En la siguiente tabla se presentan el número total de casos positivos y el número total de defunciones por Covid-19 de cada municipio, así como su respectivo porcentaje de defunciones.
Se aprecia que la mayoría de los municipios no presenta altos porcentajes de defunciones, especialmente aquellos que cuentan con un gran número de casos. Por lo tanto, podemos concluir parcialmente que la enfermedad no es tan letal, al menos en el estado de Yucatán.
# Porcentajes de defunciones y def con comorbilidad por municipio
ind_def_comorb_mun <- covid_data_yuc %>%
filter(clasificacion_final %in% c(1, 2, 3)) %>% # Se filtra por casos positivos
mutate(comorbilidad = across(.cols = diabetes:tabaquismo, ~ ifelse(. == 1, 1, 0)),
comorbilidad = unlist(across(starts_with("comorbilidad"), ~ rowSums(.)))) %>%
group_by(municipio, municipio_res) %>%
summarise(num_casos_positivos = sum(clasificacion_final %in% c(1, 2, 3)),
num_defunciones = sum(!is.na(fecha_def)),
porc_defunciones = round(sum(!is.na(fecha_def))/sum(clasificacion_final %in% c(1, 2, 3)), 4)*100,
num_casos_comorbilidad = sum(comorbilidad != 0),
porc_comorbilidad = round(sum(comorbilidad != 0 & clasificacion_final %in% c(1, 2, 3))/sum(clasificacion_final %in% c(1, 2, 3)), 4)*100)
# Solo defunciones
ind_def_mun <- ind_def_comorb_mun %>%
select(municipio, num_casos_positivos, num_defunciones, porc_defunciones)
ind_def_mun| municipio | num_casos_positivos | num_defunciones | porc_defunciones |
|---|---|---|---|
| ABALÁ | 74 | 12 | 16.22 |
| ACANCEH | 499 | 56 | 11.22 |
| AKIL | 113 | 18 | 15.93 |
| BACA | 99 | 30 | 30.30 |
| BOKOBÁ | 44 | 8 | 18.18 |
| BUCTZOTZ | 245 | 12 | 4.90 |
| CACALCHÉN | 72 | 11 | 15.28 |
| CALOTMUL | 21 | 4 | 19.05 |
| CANSAHCAB | 65 | 22 | 33.85 |
| CANTAMAYEC | 10 | 2 | 20.00 |
| CELESTÚN | 72 | 9 | 12.50 |
| CENOTILLO | 40 | 5 | 12.50 |
| CHACSINKÍN | 21 | 0 | 0.00 |
| CHANKOM | 86 | 9 | 10.47 |
| CHAPAB | 86 | 7 | 8.14 |
| CHEMAX | 313 | 35 | 11.18 |
| CHICHIMILÁ | 151 | 18 | 11.92 |
| CHICXULUB PUEBLO | 49 | 14 | 28.57 |
| CHIKINDZONOT | 37 | 7 | 18.92 |
| CHOCHOLÁ | 52 | 7 | 13.46 |
| CHUMAYEL | 46 | 7 | 15.22 |
| CONKAL | 370 | 37 | 10.00 |
| CUNCUNUL | 91 | 6 | 6.59 |
| CUZAMÁ | 40 | 8 | 20.00 |
| DZÁN | 110 | 10 | 9.09 |
| DZEMUL | 71 | 7 | 9.86 |
| DZIDZANTÚN | 82 | 19 | 23.17 |
| DZILAM DE BRAVO | 15 | 6 | 40.00 |
| DZILAM GONZÁLEZ | 32 | 9 | 28.12 |
| DZITÁS | 101 | 11 | 10.89 |
| DZONCAUICH | 15 | 8 | 53.33 |
| ESPITA | 214 | 29 | 13.55 |
| HALACHÓ | 157 | 31 | 19.75 |
| HOCABÁ | 50 | 16 | 32.00 |
| HOCTÚN | 66 | 18 | 27.27 |
| HOMÚN | 71 | 21 | 29.58 |
| HUHÍ | 33 | 8 | 24.24 |
| HUNUCMÁ | 1022 | 68 | 6.65 |
| IXIL | 38 | 7 | 18.42 |
| IZAMAL | 617 | 82 | 13.29 |
| KANASÍN | 3003 | 158 | 5.26 |
| KANTUNIL | 27 | 7 | 25.93 |
| KAUA | 39 | 5 | 12.82 |
| KINCHIL | 125 | 14 | 11.20 |
| KOPOMÁ | 34 | 8 | 23.53 |
| MAMA | 34 | 3 | 8.82 |
| MANÍ | 47 | 6 | 12.77 |
| MAXCANÚ | 662 | 60 | 9.06 |
| MAYAPÁN | 6 | 2 | 33.33 |
| MÉRIDA | 47974 | 3241 | 6.76 |
| MOCOCHÁ | 46 | 6 | 13.04 |
| MOTUL | 882 | 117 | 13.27 |
| MUNA | 162 | 37 | 22.84 |
| MUXUPIP | 40 | 8 | 20.00 |
| NO ESPECIFICADO | 1 | 0 | 0.00 |
| OPICHÉN | 69 | 8 | 11.59 |
| OXKUTZCAB | 352 | 58 | 16.48 |
| PANABÁ | 102 | 17 | 16.67 |
| PETO | 405 | 18 | 4.44 |
| PROGRESO | 1984 | 110 | 5.54 |
| QUINTANA ROO | 8 | 2 | 25.00 |
| RÍO LAGARTOS | 115 | 9 | 7.83 |
| SACALUM | 79 | 8 | 10.13 |
| SAMAHIL | 131 | 12 | 9.16 |
| SAN FELIPE | 136 | 5 | 3.68 |
| SANAHCAT | 12 | 6 | 50.00 |
| SANTA ELENA | 54 | 3 | 5.56 |
| SEYÉ | 121 | 22 | 18.18 |
| SINANCHÉ | 39 | 9 | 23.08 |
| SOTUTA | 27 | 8 | 29.63 |
| SUCILÁ | 117 | 4 | 3.42 |
| SUDZAL | 18 | 4 | 22.22 |
| SUMA | 36 | 11 | 30.56 |
| TAHDZIÚ | 11 | 0 | 0.00 |
| TAHMEK | 68 | 18 | 26.47 |
| TEABO | 110 | 4 | 3.64 |
| TECOH | 160 | 32 | 20.00 |
| TEKAL DE VENEGAS | 19 | 5 | 26.32 |
| TEKANTÓ | 36 | 8 | 22.22 |
| TEKAX | 1017 | 49 | 4.82 |
| TEKIT | 42 | 8 | 19.05 |
| TEKOM | 68 | 12 | 17.65 |
| TELCHAC PUEBLO | 40 | 6 | 15.00 |
| TELCHAC PUERTO | 20 | 4 | 20.00 |
| TEMAX | 51 | 9 | 17.65 |
| TEMOZÓN | 341 | 48 | 14.08 |
| TEPAKÁN | 18 | 5 | 27.78 |
| TETIZ | 50 | 6 | 12.00 |
| TEYA | 31 | 3 | 9.68 |
| TICUL | 1758 | 108 | 6.14 |
| TIMUCUY | 57 | 13 | 22.81 |
| TINUM | 267 | 26 | 9.74 |
| TIXCACALCUPUL | 37 | 9 | 24.32 |
| TIXKOKOB | 397 | 35 | 8.82 |
| TIXMEHUAC | 15 | 3 | 20.00 |
| TIXPÉHUAL | 104 | 9 | 8.65 |
| TIZIMÍN | 1988 | 137 | 6.89 |
| TUNKÁS | 28 | 8 | 28.57 |
| TZUCACAB | 156 | 9 | 5.77 |
| UAYMA | 124 | 6 | 4.84 |
| UCÚ | 51 | 7 | 13.73 |
| UMÁN | 1989 | 153 | 7.69 |
| VALLADOLID | 3914 | 263 | 6.72 |
| XOCCHEL | 21 | 5 | 23.81 |
| YAXCABÁ | 117 | 11 | 9.40 |
| YAXKUKUL | 49 | 6 | 12.24 |
| YOBAÍN | 20 | 2 | 10.00 |
2. (5%) % de casos positivos con al menos una comorbilidad a nivel municipal.
En el siguiente caso, se examinan los porcentajes de casos positivos de pacientes que cuenten con al menos una comorbilidad (diabetes, epoc, asma, inmusupr, hipertensión u otra enfermedad.).
Por lo visto, son bastantes los casos.
# Solo comorbilidad
ind_comorb_mun <- ind_def_comorb_mun %>%
select(municipio, num_casos_positivos, porc_comorbilidad)
ind_comorb_mun| municipio | num_casos_positivos | porc_comorbilidad |
|---|---|---|
| ABALÁ | 74 | 47.30 |
| ACANCEH | 499 | 36.07 |
| AKIL | 113 | 46.90 |
| BACA | 99 | 64.65 |
| BOKOBÁ | 44 | 34.09 |
| BUCTZOTZ | 245 | 33.06 |
| CACALCHÉN | 72 | 43.06 |
| CALOTMUL | 21 | 57.14 |
| CANSAHCAB | 65 | 49.23 |
| CANTAMAYEC | 10 | 20.00 |
| CELESTÚN | 72 | 54.17 |
| CENOTILLO | 40 | 42.50 |
| CHACSINKÍN | 21 | 47.62 |
| CHANKOM | 86 | 29.07 |
| CHAPAB | 86 | 39.53 |
| CHEMAX | 313 | 26.52 |
| CHICHIMILÁ | 151 | 39.07 |
| CHICXULUB PUEBLO | 49 | 59.18 |
| CHIKINDZONOT | 37 | 35.14 |
| CHOCHOLÁ | 52 | 51.92 |
| CHUMAYEL | 46 | 45.65 |
| CONKAL | 370 | 30.81 |
| CUNCUNUL | 91 | 24.18 |
| CUZAMÁ | 40 | 37.50 |
| DZÁN | 110 | 38.18 |
| DZEMUL | 71 | 38.03 |
| DZIDZANTÚN | 82 | 43.90 |
| DZILAM DE BRAVO | 15 | 66.67 |
| DZILAM GONZÁLEZ | 32 | 75.00 |
| DZITÁS | 101 | 35.64 |
| DZONCAUICH | 15 | 46.67 |
| ESPITA | 214 | 40.19 |
| HALACHÓ | 157 | 43.95 |
| HOCABÁ | 50 | 38.00 |
| HOCTÚN | 66 | 56.06 |
| HOMÚN | 71 | 47.89 |
| HUHÍ | 33 | 42.42 |
| HUNUCMÁ | 1022 | 22.11 |
| IXIL | 38 | 39.47 |
| IZAMAL | 617 | 31.60 |
| KANASÍN | 3003 | 30.94 |
| KANTUNIL | 27 | 59.26 |
| KAUA | 39 | 43.59 |
| KINCHIL | 125 | 17.60 |
| KOPOMÁ | 34 | 29.41 |
| MAMA | 34 | 32.35 |
| MANÍ | 47 | 36.17 |
| MAXCANÚ | 662 | 34.44 |
| MAYAPÁN | 6 | 50.00 |
| MÉRIDA | 47974 | 28.48 |
| MOCOCHÁ | 46 | 32.61 |
| MOTUL | 882 | 35.83 |
| MUNA | 162 | 48.77 |
| MUXUPIP | 40 | 50.00 |
| NO ESPECIFICADO | 1 | 0.00 |
| OPICHÉN | 69 | 40.58 |
| OXKUTZCAB | 352 | 50.57 |
| PANABÁ | 102 | 50.98 |
| PETO | 405 | 40.74 |
| PROGRESO | 1984 | 25.20 |
| QUINTANA ROO | 8 | 50.00 |
| RÍO LAGARTOS | 115 | 43.48 |
| SACALUM | 79 | 50.63 |
| SAMAHIL | 131 | 25.95 |
| SAN FELIPE | 136 | 39.71 |
| SANAHCAT | 12 | 50.00 |
| SANTA ELENA | 54 | 42.59 |
| SEYÉ | 121 | 44.63 |
| SINANCHÉ | 39 | 66.67 |
| SOTUTA | 27 | 55.56 |
| SUCILÁ | 117 | 31.62 |
| SUDZAL | 18 | 50.00 |
| SUMA | 36 | 38.89 |
| TAHDZIÚ | 11 | 27.27 |
| TAHMEK | 68 | 45.59 |
| TEABO | 110 | 26.36 |
| TECOH | 160 | 50.00 |
| TEKAL DE VENEGAS | 19 | 42.11 |
| TEKANTÓ | 36 | 55.56 |
| TEKAX | 1017 | 32.25 |
| TEKIT | 42 | 59.52 |
| TEKOM | 68 | 39.71 |
| TELCHAC PUEBLO | 40 | 35.00 |
| TELCHAC PUERTO | 20 | 65.00 |
| TEMAX | 51 | 33.33 |
| TEMOZÓN | 341 | 39.00 |
| TEPAKÁN | 18 | 61.11 |
| TETIZ | 50 | 38.00 |
| TEYA | 31 | 38.71 |
| TICUL | 1758 | 37.71 |
| TIMUCUY | 57 | 40.35 |
| TINUM | 267 | 22.10 |
| TIXCACALCUPUL | 37 | 45.95 |
| TIXKOKOB | 397 | 20.91 |
| TIXMEHUAC | 15 | 53.33 |
| TIXPÉHUAL | 104 | 32.69 |
| TIZIMÍN | 1988 | 33.60 |
| TUNKÁS | 28 | 60.71 |
| TZUCACAB | 156 | 33.97 |
| UAYMA | 124 | 33.87 |
| UCÚ | 51 | 43.14 |
| UMÁN | 1989 | 24.69 |
| VALLADOLID | 3914 | 29.97 |
| XOCCHEL | 21 | 47.62 |
| YAXCABÁ | 117 | 32.48 |
| YAXKUKUL | 49 | 48.98 |
| YOBAÍN | 20 | 45.00 |
3. (10%) Total de casos positivos acumulados por día a nivel estatal.
Ahora analizamos los datos a nivel estatal.
La siguiente tabla muestra que se registraron 75,451 casos positivos hasta el día 14 de Diciembre de 2021, lo cual concuerda con la cifra reportada en el portal datos.covid-19.conacyt.mx.
Casos positivos
ind_casos_est <- covid_data_yuc %>%
filter(clasificacion_final %in% c(1, 2, 3)) %>% # Se filtra por casos positivos
mutate(positivo = ifelse(clasificacion_final %in% c(1, 2, 3), 1, 0)) %>%
group_by(fecha_ingreso) %>%
summarise(casos_dia = sum(positivo == 1)) %>%
ungroup() %>%
mutate(casos_dia = cumsum(casos_dia))
ind_casos_est| fecha_ingreso | casos_dia |
|---|---|
| 2020-03-12 | 1 |
| 2020-03-15 | 5 |
| 2020-03-16 | 7 |
| 2020-03-17 | 13 |
| 2020-03-19 | 15 |
| 2020-03-20 | 21 |
| 2020-03-22 | 29 |
| 2020-03-23 | 35 |
| 2020-03-24 | 44 |
| 2020-03-25 | 49 |
| 2020-03-27 | 52 |
| 2020-03-28 | 57 |
| 2020-03-29 | 61 |
| 2020-03-30 | 71 |
| 2020-03-31 | 75 |
| 2020-04-01 | 84 |
| 2020-04-02 | 87 |
| 2020-04-03 | 97 |
| 2020-04-04 | 99 |
| 2020-04-05 | 104 |
| 2020-04-06 | 118 |
| 2020-04-07 | 131 |
| 2020-04-08 | 141 |
| 2020-04-09 | 152 |
| 2020-04-10 | 157 |
| 2020-04-11 | 165 |
| 2020-04-12 | 174 |
| 2020-04-13 | 196 |
| 2020-04-14 | 217 |
| 2020-04-15 | 248 |
| 2020-04-16 | 262 |
| 2020-04-17 | 277 |
| 2020-04-18 | 287 |
| 2020-04-19 | 297 |
| 2020-04-20 | 325 |
| 2020-04-21 | 346 |
| 2020-04-22 | 368 |
| 2020-04-23 | 402 |
| 2020-04-24 | 439 |
| 2020-04-25 | 463 |
| 2020-04-26 | 484 |
| 2020-04-27 | 529 |
| 2020-04-28 | 578 |
| 2020-04-29 | 610 |
| 2020-04-30 | 670 |
| 2020-05-01 | 696 |
| 2020-05-02 | 726 |
| 2020-05-03 | 758 |
| 2020-05-04 | 811 |
| 2020-05-05 | 856 |
| 2020-05-06 | 889 |
| 2020-05-07 | 925 |
| 2020-05-08 | 964 |
| 2020-05-09 | 984 |
| 2020-05-10 | 1010 |
| 2020-05-11 | 1055 |
| 2020-05-12 | 1107 |
| 2020-05-13 | 1170 |
| 2020-05-14 | 1230 |
| 2020-05-15 | 1271 |
| 2020-05-16 | 1303 |
| 2020-05-17 | 1352 |
| 2020-05-18 | 1407 |
| 2020-05-19 | 1462 |
| 2020-05-20 | 1521 |
| 2020-05-21 | 1592 |
| 2020-05-22 | 1655 |
| 2020-05-23 | 1689 |
| 2020-05-24 | 1720 |
| 2020-05-25 | 1776 |
| 2020-05-26 | 1832 |
| 2020-05-27 | 1893 |
| 2020-05-28 | 1953 |
| 2020-05-29 | 2000 |
| 2020-05-30 | 2030 |
| 2020-05-31 | 2055 |
| 2020-06-01 | 2112 |
| 2020-06-02 | 2160 |
| 2020-06-03 | 2212 |
| 2020-06-04 | 2256 |
| 2020-06-05 | 2290 |
| 2020-06-06 | 2335 |
| 2020-06-07 | 2371 |
| 2020-06-08 | 2460 |
| 2020-06-09 | 2530 |
| 2020-06-10 | 2602 |
| 2020-06-11 | 2686 |
| 2020-06-12 | 2752 |
| 2020-06-13 | 2794 |
| 2020-06-14 | 2853 |
| 2020-06-15 | 2955 |
| 2020-06-16 | 3054 |
| 2020-06-17 | 3171 |
| 2020-06-18 | 3276 |
| 2020-06-19 | 3388 |
| 2020-06-20 | 3484 |
| 2020-06-21 | 3576 |
| 2020-06-22 | 3722 |
| 2020-06-23 | 3873 |
| 2020-06-24 | 4047 |
| 2020-06-25 | 4237 |
| 2020-06-26 | 4384 |
| 2020-06-27 | 4482 |
| 2020-06-28 | 4554 |
| 2020-06-29 | 4746 |
| 2020-06-30 | 4907 |
| 2020-07-01 | 5079 |
| 2020-07-02 | 5243 |
| 2020-07-03 | 5439 |
| 2020-07-04 | 5510 |
| 2020-07-05 | 5584 |
| 2020-07-06 | 5761 |
| 2020-07-07 | 5949 |
| 2020-07-08 | 6137 |
| 2020-07-09 | 6326 |
| 2020-07-10 | 6512 |
| 2020-07-11 | 6606 |
| 2020-07-12 | 6700 |
| 2020-07-13 | 6914 |
| 2020-07-14 | 7111 |
| 2020-07-15 | 7315 |
| 2020-07-16 | 7527 |
| 2020-07-17 | 7721 |
| 2020-07-18 | 7815 |
| 2020-07-19 | 7901 |
| 2020-07-20 | 8163 |
| 2020-07-21 | 8400 |
| 2020-07-22 | 8659 |
| 2020-07-23 | 8901 |
| 2020-07-24 | 9159 |
| 2020-07-25 | 9257 |
| 2020-07-26 | 9350 |
| 2020-07-27 | 9623 |
| 2020-07-28 | 9957 |
| 2020-07-29 | 10254 |
| 2020-07-30 | 10628 |
| 2020-07-31 | 10862 |
| 2020-08-01 | 10986 |
| 2020-08-02 | 11068 |
| 2020-08-03 | 11278 |
| 2020-08-04 | 11471 |
| 2020-08-05 | 11653 |
| 2020-08-06 | 11823 |
| 2020-08-07 | 11985 |
| 2020-08-08 | 12103 |
| 2020-08-09 | 12199 |
| 2020-08-10 | 12353 |
| 2020-08-11 | 12533 |
| 2020-08-12 | 12665 |
| 2020-08-13 | 12814 |
| 2020-08-14 | 12993 |
| 2020-08-15 | 13094 |
| 2020-08-16 | 13187 |
| 2020-08-17 | 13362 |
| 2020-08-18 | 13585 |
| 2020-08-19 | 13723 |
| 2020-08-20 | 13898 |
| 2020-08-21 | 14048 |
| 2020-08-22 | 14111 |
| 2020-08-23 | 14221 |
| 2020-08-24 | 14406 |
| 2020-08-25 | 14574 |
| 2020-08-26 | 14713 |
| 2020-08-27 | 14964 |
| 2020-08-28 | 15185 |
| 2020-08-29 | 15234 |
| 2020-08-30 | 15282 |
| 2020-08-31 | 15455 |
| 2020-09-01 | 15596 |
| 2020-09-02 | 15765 |
| 2020-09-03 | 15930 |
| 2020-09-04 | 16078 |
| 2020-09-05 | 16144 |
| 2020-09-06 | 16217 |
| 2020-09-07 | 16402 |
| 2020-09-08 | 16585 |
| 2020-09-09 | 16734 |
| 2020-09-10 | 16879 |
| 2020-09-11 | 17014 |
| 2020-09-12 | 17082 |
| 2020-09-13 | 17140 |
| 2020-09-14 | 17238 |
| 2020-09-15 | 17355 |
| 2020-09-16 | 17392 |
| 2020-09-17 | 17551 |
| 2020-09-18 | 17670 |
| 2020-09-19 | 17737 |
| 2020-09-20 | 17783 |
| 2020-09-21 | 17923 |
| 2020-09-22 | 18064 |
| 2020-09-23 | 18203 |
| 2020-09-24 | 18364 |
| 2020-09-25 | 18471 |
| 2020-09-26 | 18502 |
| 2020-09-27 | 18557 |
| 2020-09-28 | 18683 |
| 2020-09-29 | 18794 |
| 2020-09-30 | 18907 |
| 2020-10-01 | 19014 |
| 2020-10-02 | 19109 |
| 2020-10-03 | 19137 |
| 2020-10-04 | 19181 |
| 2020-10-05 | 19311 |
| 2020-10-06 | 19413 |
| 2020-10-07 | 19439 |
| 2020-10-08 | 19513 |
| 2020-10-09 | 19613 |
| 2020-10-10 | 19659 |
| 2020-10-11 | 19712 |
| 2020-10-12 | 19851 |
| 2020-10-13 | 20026 |
| 2020-10-14 | 20135 |
| 2020-10-15 | 20247 |
| 2020-10-16 | 20380 |
| 2020-10-17 | 20456 |
| 2020-10-18 | 20490 |
| 2020-10-19 | 20622 |
| 2020-10-20 | 20818 |
| 2020-10-21 | 20981 |
| 2020-10-22 | 21123 |
| 2020-10-23 | 21232 |
| 2020-10-24 | 21285 |
| 2020-10-25 | 21328 |
| 2020-10-26 | 21432 |
| 2020-10-27 | 21467 |
| 2020-10-28 | 21553 |
| 2020-10-29 | 21653 |
| 2020-10-30 | 21724 |
| 2020-10-31 | 21767 |
| 2020-11-01 | 21797 |
| 2020-11-02 | 21861 |
| 2020-11-03 | 21948 |
| 2020-11-04 | 22021 |
| 2020-11-05 | 22090 |
| 2020-11-06 | 22171 |
| 2020-11-07 | 22210 |
| 2020-11-08 | 22254 |
| 2020-11-09 | 22324 |
| 2020-11-10 | 22444 |
| 2020-11-11 | 22522 |
| 2020-11-12 | 22674 |
| 2020-11-13 | 22745 |
| 2020-11-14 | 22792 |
| 2020-11-15 | 22830 |
| 2020-11-16 | 22864 |
| 2020-11-17 | 22951 |
| 2020-11-18 | 23066 |
| 2020-11-19 | 23169 |
| 2020-11-20 | 23289 |
| 2020-11-21 | 23368 |
| 2020-11-22 | 23429 |
| 2020-11-23 | 23589 |
| 2020-11-24 | 23693 |
| 2020-11-25 | 23825 |
| 2020-11-26 | 23938 |
| 2020-11-27 | 24004 |
| 2020-11-28 | 24057 |
| 2020-11-29 | 24092 |
| 2020-11-30 | 24187 |
| 2020-12-01 | 24289 |
| 2020-12-02 | 24403 |
| 2020-12-03 | 24513 |
| 2020-12-04 | 24591 |
| 2020-12-05 | 24632 |
| 2020-12-06 | 24674 |
| 2020-12-07 | 24762 |
| 2020-12-08 | 24862 |
| 2020-12-09 | 24949 |
| 2020-12-10 | 25032 |
| 2020-12-11 | 25132 |
| 2020-12-12 | 25180 |
| 2020-12-13 | 25230 |
| 2020-12-14 | 25404 |
| 2020-12-15 | 25540 |
| 2020-12-16 | 25660 |
| 2020-12-17 | 25756 |
| 2020-12-18 | 25846 |
| 2020-12-19 | 25892 |
| 2020-12-20 | 25923 |
| 2020-12-21 | 26023 |
| 2020-12-22 | 26140 |
| 2020-12-23 | 26210 |
| 2020-12-24 | 26291 |
| 2020-12-25 | 26321 |
| 2020-12-26 | 26366 |
| 2020-12-27 | 26408 |
| 2020-12-28 | 26516 |
| 2020-12-29 | 26623 |
| 2020-12-30 | 26721 |
| 2020-12-31 | 26832 |
| 2021-01-01 | 26867 |
| 2021-01-02 | 26938 |
| 2021-01-03 | 26982 |
| 2021-01-04 | 27119 |
| 2021-01-05 | 27302 |
| 2021-01-06 | 27449 |
| 2021-01-07 | 27598 |
| 2021-01-08 | 27749 |
| 2021-01-09 | 27818 |
| 2021-01-10 | 27875 |
| 2021-01-11 | 27995 |
| 2021-01-12 | 28133 |
| 2021-01-13 | 28237 |
| 2021-01-14 | 28354 |
| 2021-01-15 | 28502 |
| 2021-01-16 | 28547 |
| 2021-01-17 | 28602 |
| 2021-01-18 | 28702 |
| 2021-01-19 | 28854 |
| 2021-01-20 | 29030 |
| 2021-01-21 | 29159 |
| 2021-01-22 | 29289 |
| 2021-01-23 | 29355 |
| 2021-01-24 | 29413 |
| 2021-01-25 | 29555 |
| 2021-01-26 | 29706 |
| 2021-01-27 | 29857 |
| 2021-01-28 | 30012 |
| 2021-01-29 | 30125 |
| 2021-01-30 | 30162 |
| 2021-01-31 | 30198 |
| 2021-02-01 | 30243 |
| 2021-02-02 | 30411 |
| 2021-02-03 | 30532 |
| 2021-02-04 | 30627 |
| 2021-02-05 | 30702 |
| 2021-02-06 | 30739 |
| 2021-02-07 | 30795 |
| 2021-02-08 | 30926 |
| 2021-02-09 | 31042 |
| 2021-02-10 | 31164 |
| 2021-02-11 | 31263 |
| 2021-02-12 | 31359 |
| 2021-02-13 | 31410 |
| 2021-02-14 | 31454 |
| 2021-02-15 | 31566 |
| 2021-02-16 | 31654 |
| 2021-02-17 | 31764 |
| 2021-02-18 | 31877 |
| 2021-02-19 | 31975 |
| 2021-02-20 | 32019 |
| 2021-02-21 | 32054 |
| 2021-02-22 | 32178 |
| 2021-02-23 | 32319 |
| 2021-02-24 | 32422 |
| 2021-02-25 | 32517 |
| 2021-02-26 | 32667 |
| 2021-02-27 | 32722 |
| 2021-02-28 | 32766 |
| 2021-03-01 | 32905 |
| 2021-03-02 | 33036 |
| 2021-03-03 | 33148 |
| 2021-03-04 | 33276 |
| 2021-03-05 | 33378 |
| 2021-03-06 | 33416 |
| 2021-03-07 | 33457 |
| 2021-03-08 | 33565 |
| 2021-03-09 | 33664 |
| 2021-03-10 | 33775 |
| 2021-03-11 | 33876 |
| 2021-03-12 | 33968 |
| 2021-03-13 | 34011 |
| 2021-03-14 | 34040 |
| 2021-03-15 | 34073 |
| 2021-03-16 | 34190 |
| 2021-03-17 | 34298 |
| 2021-03-18 | 34393 |
| 2021-03-19 | 34483 |
| 2021-03-20 | 34526 |
| 2021-03-21 | 34565 |
| 2021-03-22 | 34665 |
| 2021-03-23 | 34749 |
| 2021-03-24 | 34831 |
| 2021-03-25 | 34918 |
| 2021-03-26 | 34994 |
| 2021-03-27 | 35019 |
| 2021-03-28 | 35047 |
| 2021-03-29 | 35139 |
| 2021-03-30 | 35216 |
| 2021-03-31 | 35293 |
| 2021-04-01 | 35366 |
| 2021-04-02 | 35396 |
| 2021-04-03 | 35437 |
| 2021-04-04 | 35465 |
| 2021-04-05 | 35575 |
| 2021-04-06 | 35678 |
| 2021-04-07 | 35744 |
| 2021-04-08 | 35845 |
| 2021-04-09 | 35902 |
| 2021-04-10 | 35933 |
| 2021-04-11 | 35957 |
| 2021-04-12 | 36047 |
| 2021-04-13 | 36140 |
| 2021-04-14 | 36211 |
| 2021-04-15 | 36289 |
| 2021-04-16 | 36356 |
| 2021-04-17 | 36383 |
| 2021-04-18 | 36420 |
| 2021-04-19 | 36506 |
| 2021-04-20 | 36586 |
| 2021-04-21 | 36658 |
| 2021-04-22 | 36722 |
| 2021-04-23 | 36804 |
| 2021-04-24 | 36832 |
| 2021-04-25 | 36857 |
| 2021-04-26 | 36938 |
| 2021-04-27 | 37022 |
| 2021-04-28 | 37125 |
| 2021-04-29 | 37215 |
| 2021-04-30 | 37296 |
| 2021-05-01 | 37326 |
| 2021-05-02 | 37353 |
| 2021-05-03 | 37449 |
| 2021-05-04 | 37544 |
| 2021-05-05 | 37599 |
| 2021-05-06 | 37697 |
| 2021-05-07 | 37769 |
| 2021-05-08 | 37786 |
| 2021-05-09 | 37815 |
| 2021-05-10 | 37861 |
| 2021-05-11 | 37976 |
| 2021-05-12 | 38057 |
| 2021-05-13 | 38145 |
| 2021-05-14 | 38228 |
| 2021-05-15 | 38279 |
| 2021-05-16 | 38316 |
| 2021-05-17 | 38429 |
| 2021-05-18 | 38557 |
| 2021-05-19 | 38668 |
| 2021-05-20 | 38779 |
| 2021-05-21 | 38894 |
| 2021-05-22 | 38929 |
| 2021-05-23 | 38978 |
| 2021-05-24 | 39103 |
| 2021-05-25 | 39250 |
| 2021-05-26 | 39410 |
| 2021-05-27 | 39602 |
| 2021-05-28 | 39794 |
| 2021-05-29 | 39858 |
| 2021-05-30 | 39932 |
| 2021-05-31 | 40165 |
| 2021-06-01 | 40396 |
| 2021-06-02 | 40617 |
| 2021-06-03 | 40856 |
| 2021-06-04 | 41102 |
| 2021-06-05 | 41172 |
| 2021-06-06 | 41234 |
| 2021-06-07 | 41572 |
| 2021-06-08 | 41864 |
| 2021-06-09 | 42148 |
| 2021-06-10 | 42442 |
| 2021-06-11 | 42708 |
| 2021-06-12 | 42794 |
| 2021-06-13 | 42870 |
| 2021-06-14 | 43202 |
| 2021-06-15 | 43501 |
| 2021-06-16 | 43767 |
| 2021-06-17 | 44044 |
| 2021-06-18 | 44329 |
| 2021-06-19 | 44426 |
| 2021-06-20 | 44515 |
| 2021-06-21 | 44889 |
| 2021-06-22 | 45289 |
| 2021-06-23 | 45663 |
| 2021-06-24 | 45993 |
| 2021-06-25 | 46300 |
| 2021-06-26 | 46409 |
| 2021-06-27 | 46507 |
| 2021-06-28 | 46918 |
| 2021-06-29 | 47238 |
| 2021-06-30 | 47567 |
| 2021-07-01 | 47827 |
| 2021-07-02 | 48074 |
| 2021-07-03 | 48163 |
| 2021-07-04 | 48233 |
| 2021-07-05 | 48584 |
| 2021-07-06 | 48903 |
| 2021-07-07 | 49229 |
| 2021-07-08 | 49517 |
| 2021-07-09 | 49807 |
| 2021-07-10 | 49898 |
| 2021-07-11 | 49977 |
| 2021-07-12 | 50345 |
| 2021-07-13 | 50662 |
| 2021-07-14 | 50948 |
| 2021-07-15 | 51244 |
| 2021-07-16 | 51500 |
| 2021-07-17 | 51590 |
| 2021-07-18 | 51678 |
| 2021-07-19 | 52025 |
| 2021-07-20 | 52340 |
| 2021-07-21 | 52615 |
| 2021-07-22 | 52867 |
| 2021-07-23 | 53138 |
| 2021-07-24 | 53214 |
| 2021-07-25 | 53296 |
| 2021-07-26 | 53625 |
| 2021-07-27 | 53909 |
| 2021-07-28 | 54141 |
| 2021-07-29 | 54359 |
| 2021-07-30 | 54615 |
| 2021-07-31 | 54713 |
| 2021-08-01 | 54776 |
| 2021-08-02 | 55114 |
| 2021-08-03 | 55378 |
| 2021-08-04 | 55638 |
| 2021-08-05 | 55877 |
| 2021-08-06 | 56134 |
| 2021-08-07 | 56222 |
| 2021-08-08 | 56293 |
| 2021-08-09 | 56647 |
| 2021-08-10 | 56965 |
| 2021-08-11 | 57263 |
| 2021-08-12 | 57561 |
| 2021-08-13 | 57860 |
| 2021-08-14 | 57973 |
| 2021-08-15 | 58042 |
| 2021-08-16 | 58447 |
| 2021-08-17 | 58822 |
| 2021-08-18 | 59155 |
| 2021-08-19 | 59293 |
| 2021-08-20 | 59641 |
| 2021-08-21 | 59764 |
| 2021-08-22 | 59860 |
| 2021-08-23 | 60278 |
| 2021-08-24 | 60638 |
| 2021-08-25 | 61001 |
| 2021-08-26 | 61347 |
| 2021-08-27 | 61670 |
| 2021-08-28 | 61800 |
| 2021-08-29 | 61880 |
| 2021-08-30 | 62258 |
| 2021-08-31 | 62666 |
| 2021-09-01 | 63046 |
| 2021-09-02 | 63376 |
| 2021-09-03 | 63724 |
| 2021-09-04 | 63841 |
| 2021-09-05 | 63919 |
| 2021-09-06 | 64364 |
| 2021-09-07 | 64672 |
| 2021-09-08 | 65021 |
| 2021-09-09 | 65374 |
| 2021-09-10 | 65716 |
| 2021-09-11 | 65811 |
| 2021-09-12 | 65903 |
| 2021-09-13 | 66342 |
| 2021-09-14 | 66712 |
| 2021-09-15 | 66853 |
| 2021-09-16 | 66979 |
| 2021-09-17 | 67405 |
| 2021-09-18 | 67548 |
| 2021-09-19 | 67626 |
| 2021-09-20 | 68066 |
| 2021-09-21 | 68433 |
| 2021-09-22 | 68783 |
| 2021-09-23 | 69082 |
| 2021-09-24 | 69379 |
| 2021-09-25 | 69463 |
| 2021-09-26 | 69511 |
| 2021-09-27 | 69843 |
| 2021-09-28 | 70139 |
| 2021-09-29 | 70401 |
| 2021-09-30 | 70606 |
| 2021-10-01 | 70775 |
| 2021-10-02 | 70804 |
| 2021-10-03 | 70849 |
| 2021-10-04 | 71064 |
| 2021-10-05 | 71277 |
| 2021-10-06 | 71439 |
| 2021-10-07 | 71597 |
| 2021-10-08 | 71758 |
| 2021-10-09 | 71789 |
| 2021-10-10 | 71828 |
| 2021-10-11 | 71989 |
| 2021-10-12 | 72132 |
| 2021-10-13 | 72274 |
| 2021-10-14 | 72401 |
| 2021-10-15 | 72525 |
| 2021-10-16 | 72549 |
| 2021-10-17 | 72568 |
| 2021-10-18 | 72738 |
| 2021-10-19 | 72871 |
| 2021-10-20 | 72968 |
| 2021-10-21 | 73045 |
| 2021-10-22 | 73151 |
| 2021-10-23 | 73180 |
| 2021-10-24 | 73198 |
| 2021-10-25 | 73323 |
| 2021-10-26 | 73440 |
| 2021-10-27 | 73531 |
| 2021-10-28 | 73627 |
| 2021-10-29 | 73717 |
| 2021-10-30 | 73738 |
| 2021-10-31 | 73758 |
| 2021-11-01 | 73858 |
| 2021-11-02 | 73938 |
| 2021-11-03 | 74038 |
| 2021-11-04 | 74112 |
| 2021-11-05 | 74193 |
| 2021-11-06 | 74222 |
| 2021-11-07 | 74235 |
| 2021-11-08 | 74316 |
| 2021-11-09 | 74398 |
| 2021-11-10 | 74453 |
| 2021-11-11 | 74510 |
| 2021-11-12 | 74565 |
| 2021-11-13 | 74581 |
| 2021-11-14 | 74591 |
| 2021-11-15 | 74617 |
| 2021-11-16 | 74702 |
| 2021-11-17 | 74760 |
| 2021-11-18 | 74808 |
| 2021-11-19 | 74859 |
| 2021-11-20 | 74872 |
| 2021-11-21 | 74878 |
| 2021-11-22 | 74933 |
| 2021-11-23 | 74975 |
| 2021-11-24 | 75034 |
| 2021-11-25 | 75063 |
| 2021-11-26 | 75097 |
| 2021-11-27 | 75106 |
| 2021-11-28 | 75111 |
| 2021-11-29 | 75154 |
| 2021-11-30 | 75184 |
| 2021-12-01 | 75221 |
| 2021-12-02 | 75245 |
| 2021-12-03 | 75272 |
| 2021-12-04 | 75278 |
| 2021-12-05 | 75283 |
| 2021-12-06 | 75323 |
| 2021-12-07 | 75352 |
| 2021-12-08 | 75379 |
| 2021-12-09 | 75398 |
| 2021-12-10 | 75419 |
| 2021-12-11 | 75423 |
| 2021-12-12 | 75425 |
| 2021-12-13 | 75435 |
| 2021-12-14 | 75451 |
4. (10%) Total acumulado de defunciones por día a nivel estatal.
Por otro lado, se registraron 5,707 defunciones hasta el día 12 de Diciembre de 2021, lo cual concuerda con la cifra reportada en el portal datos.covid-19.conacyt.mx.
Defunciones
ind_defun_est <- covid_data_yuc %>%
filter(clasificacion_final %in% c(1, 2, 3)) %>% # Se filtra por casos positivos
mutate(defuncion = ifelse(!is.na(fecha_def) == TRUE, 1, 0),
positivo = ifelse(clasificacion_final %in% c(1, 2, 3), 1, 0)) %>%
filter(!is.na(fecha_def)) %>%
group_by(fecha_def) %>%
summarise(defunciones_dia = sum(defuncion == 1)) %>%
ungroup() %>%
mutate(defunciones_dia = cumsum(defunciones_dia))
ind_defun_est| fecha_def | defunciones_dia |
|---|---|
| 2020-03-24 | 1 |
| 2020-04-03 | 3 |
| 2020-04-06 | 4 |
| 2020-04-07 | 6 |
| 2020-04-10 | 9 |
| 2020-04-13 | 10 |
| 2020-04-15 | 13 |
| 2020-04-16 | 14 |
| 2020-04-17 | 15 |
| 2020-04-19 | 16 |
| 2020-04-20 | 18 |
| 2020-04-21 | 21 |
| 2020-04-22 | 22 |
| 2020-04-23 | 26 |
| 2020-04-24 | 28 |
| 2020-04-25 | 30 |
| 2020-04-26 | 32 |
| 2020-04-27 | 33 |
| 2020-04-28 | 36 |
| 2020-04-29 | 39 |
| 2020-04-30 | 40 |
| 2020-05-01 | 42 |
| 2020-05-02 | 48 |
| 2020-05-03 | 50 |
| 2020-05-04 | 52 |
| 2020-05-05 | 59 |
| 2020-05-06 | 63 |
| 2020-05-07 | 66 |
| 2020-05-08 | 68 |
| 2020-05-09 | 69 |
| 2020-05-10 | 76 |
| 2020-05-11 | 82 |
| 2020-05-12 | 89 |
| 2020-05-13 | 95 |
| 2020-05-14 | 102 |
| 2020-05-15 | 103 |
| 2020-05-16 | 106 |
| 2020-05-17 | 114 |
| 2020-05-18 | 119 |
| 2020-05-19 | 123 |
| 2020-05-20 | 137 |
| 2020-05-21 | 143 |
| 2020-05-22 | 149 |
| 2020-05-23 | 157 |
| 2020-05-24 | 160 |
| 2020-05-25 | 169 |
| 2020-05-26 | 179 |
| 2020-05-27 | 189 |
| 2020-05-28 | 198 |
| 2020-05-29 | 205 |
| 2020-05-30 | 214 |
| 2020-05-31 | 222 |
| 2020-06-01 | 233 |
| 2020-06-02 | 244 |
| 2020-06-03 | 248 |
| 2020-06-04 | 254 |
| 2020-06-05 | 259 |
| 2020-06-06 | 266 |
| 2020-06-07 | 270 |
| 2020-06-08 | 275 |
| 2020-06-09 | 284 |
| 2020-06-10 | 294 |
| 2020-06-11 | 302 |
| 2020-06-12 | 307 |
| 2020-06-13 | 316 |
| 2020-06-14 | 329 |
| 2020-06-15 | 342 |
| 2020-06-16 | 348 |
| 2020-06-17 | 356 |
| 2020-06-18 | 366 |
| 2020-06-19 | 369 |
| 2020-06-20 | 378 |
| 2020-06-21 | 388 |
| 2020-06-22 | 395 |
| 2020-06-23 | 407 |
| 2020-06-24 | 428 |
| 2020-06-25 | 445 |
| 2020-06-26 | 457 |
| 2020-06-27 | 466 |
| 2020-06-28 | 474 |
| 2020-06-29 | 492 |
| 2020-06-30 | 515 |
| 2020-07-01 | 533 |
| 2020-07-02 | 547 |
| 2020-07-03 | 567 |
| 2020-07-04 | 584 |
| 2020-07-05 | 594 |
| 2020-07-06 | 617 |
| 2020-07-07 | 640 |
| 2020-07-08 | 655 |
| 2020-07-09 | 674 |
| 2020-07-10 | 698 |
| 2020-07-11 | 715 |
| 2020-07-12 | 732 |
| 2020-07-13 | 752 |
| 2020-07-14 | 772 |
| 2020-07-15 | 803 |
| 2020-07-16 | 828 |
| 2020-07-17 | 850 |
| 2020-07-18 | 875 |
| 2020-07-19 | 893 |
| 2020-07-20 | 930 |
| 2020-07-21 | 965 |
| 2020-07-22 | 1005 |
| 2020-07-23 | 1037 |
| 2020-07-24 | 1060 |
| 2020-07-25 | 1087 |
| 2020-07-26 | 1111 |
| 2020-07-27 | 1150 |
| 2020-07-28 | 1192 |
| 2020-07-29 | 1217 |
| 2020-07-30 | 1237 |
| 2020-07-31 | 1260 |
| 2020-08-01 | 1298 |
| 2020-08-02 | 1321 |
| 2020-08-03 | 1356 |
| 2020-08-04 | 1397 |
| 2020-08-05 | 1429 |
| 2020-08-06 | 1463 |
| 2020-08-07 | 1487 |
| 2020-08-08 | 1511 |
| 2020-08-09 | 1534 |
| 2020-08-10 | 1568 |
| 2020-08-11 | 1599 |
| 2020-08-12 | 1620 |
| 2020-08-13 | 1651 |
| 2020-08-14 | 1668 |
| 2020-08-15 | 1695 |
| 2020-08-16 | 1714 |
| 2020-08-17 | 1735 |
| 2020-08-18 | 1763 |
| 2020-08-19 | 1778 |
| 2020-08-20 | 1792 |
| 2020-08-21 | 1817 |
| 2020-08-22 | 1840 |
| 2020-08-23 | 1859 |
| 2020-08-24 | 1875 |
| 2020-08-25 | 1896 |
| 2020-08-26 | 1916 |
| 2020-08-27 | 1939 |
| 2020-08-28 | 1952 |
| 2020-08-29 | 1961 |
| 2020-08-30 | 1985 |
| 2020-08-31 | 2003 |
| 2020-09-01 | 2018 |
| 2020-09-02 | 2037 |
| 2020-09-03 | 2053 |
| 2020-09-04 | 2063 |
| 2020-09-05 | 2074 |
| 2020-09-06 | 2086 |
| 2020-09-07 | 2099 |
| 2020-09-08 | 2107 |
| 2020-09-09 | 2119 |
| 2020-09-10 | 2129 |
| 2020-09-11 | 2140 |
| 2020-09-12 | 2144 |
| 2020-09-13 | 2150 |
| 2020-09-14 | 2159 |
| 2020-09-15 | 2170 |
| 2020-09-16 | 2177 |
| 2020-09-17 | 2185 |
| 2020-09-18 | 2194 |
| 2020-09-19 | 2197 |
| 2020-09-20 | 2206 |
| 2020-09-21 | 2213 |
| 2020-09-22 | 2220 |
| 2020-09-23 | 2225 |
| 2020-09-24 | 2230 |
| 2020-09-25 | 2237 |
| 2020-09-26 | 2244 |
| 2020-09-27 | 2250 |
| 2020-09-28 | 2253 |
| 2020-09-29 | 2261 |
| 2020-09-30 | 2265 |
| 2020-10-01 | 2279 |
| 2020-10-02 | 2285 |
| 2020-10-03 | 2287 |
| 2020-10-04 | 2293 |
| 2020-10-05 | 2297 |
| 2020-10-06 | 2307 |
| 2020-10-07 | 2318 |
| 2020-10-08 | 2326 |
| 2020-10-09 | 2330 |
| 2020-10-10 | 2335 |
| 2020-10-11 | 2343 |
| 2020-10-12 | 2350 |
| 2020-10-13 | 2354 |
| 2020-10-14 | 2355 |
| 2020-10-15 | 2366 |
| 2020-10-16 | 2370 |
| 2020-10-17 | 2380 |
| 2020-10-18 | 2383 |
| 2020-10-19 | 2390 |
| 2020-10-20 | 2395 |
| 2020-10-21 | 2407 |
| 2020-10-22 | 2415 |
| 2020-10-23 | 2423 |
| 2020-10-24 | 2429 |
| 2020-10-25 | 2434 |
| 2020-10-26 | 2442 |
| 2020-10-27 | 2448 |
| 2020-10-28 | 2457 |
| 2020-10-29 | 2461 |
| 2020-10-30 | 2468 |
| 2020-10-31 | 2475 |
| 2020-11-01 | 2479 |
| 2020-11-02 | 2482 |
| 2020-11-03 | 2493 |
| 2020-11-04 | 2499 |
| 2020-11-05 | 2502 |
| 2020-11-06 | 2505 |
| 2020-11-07 | 2508 |
| 2020-11-08 | 2517 |
| 2020-11-09 | 2523 |
| 2020-11-10 | 2528 |
| 2020-11-11 | 2531 |
| 2020-11-12 | 2545 |
| 2020-11-13 | 2550 |
| 2020-11-14 | 2556 |
| 2020-11-15 | 2557 |
| 2020-11-16 | 2564 |
| 2020-11-17 | 2569 |
| 2020-11-18 | 2574 |
| 2020-11-19 | 2582 |
| 2020-11-20 | 2587 |
| 2020-11-21 | 2593 |
| 2020-11-22 | 2600 |
| 2020-11-23 | 2608 |
| 2020-11-24 | 2614 |
| 2020-11-25 | 2619 |
| 2020-11-26 | 2620 |
| 2020-11-27 | 2625 |
| 2020-11-28 | 2628 |
| 2020-11-29 | 2630 |
| 2020-11-30 | 2639 |
| 2020-12-01 | 2652 |
| 2020-12-02 | 2658 |
| 2020-12-03 | 2666 |
| 2020-12-04 | 2676 |
| 2020-12-05 | 2680 |
| 2020-12-06 | 2686 |
| 2020-12-07 | 2696 |
| 2020-12-08 | 2703 |
| 2020-12-09 | 2707 |
| 2020-12-10 | 2712 |
| 2020-12-11 | 2716 |
| 2020-12-12 | 2725 |
| 2020-12-13 | 2730 |
| 2020-12-14 | 2738 |
| 2020-12-15 | 2743 |
| 2020-12-16 | 2753 |
| 2020-12-17 | 2760 |
| 2020-12-18 | 2769 |
| 2020-12-19 | 2772 |
| 2020-12-20 | 2774 |
| 2020-12-21 | 2781 |
| 2020-12-22 | 2784 |
| 2020-12-23 | 2787 |
| 2020-12-24 | 2794 |
| 2020-12-25 | 2797 |
| 2020-12-26 | 2801 |
| 2020-12-27 | 2808 |
| 2020-12-28 | 2818 |
| 2020-12-29 | 2825 |
| 2020-12-30 | 2833 |
| 2020-12-31 | 2838 |
| 2021-01-01 | 2846 |
| 2021-01-02 | 2849 |
| 2021-01-03 | 2856 |
| 2021-01-04 | 2863 |
| 2021-01-05 | 2871 |
| 2021-01-06 | 2879 |
| 2021-01-07 | 2884 |
| 2021-01-08 | 2889 |
| 2021-01-09 | 2899 |
| 2021-01-10 | 2905 |
| 2021-01-11 | 2913 |
| 2021-01-12 | 2920 |
| 2021-01-13 | 2925 |
| 2021-01-14 | 2933 |
| 2021-01-15 | 2940 |
| 2021-01-16 | 2943 |
| 2021-01-17 | 2944 |
| 2021-01-18 | 2960 |
| 2021-01-19 | 2967 |
| 2021-01-20 | 2978 |
| 2021-01-21 | 2987 |
| 2021-01-22 | 3000 |
| 2021-01-23 | 3007 |
| 2021-01-24 | 3015 |
| 2021-01-25 | 3024 |
| 2021-01-26 | 3036 |
| 2021-01-27 | 3048 |
| 2021-01-28 | 3059 |
| 2021-01-29 | 3067 |
| 2021-01-30 | 3079 |
| 2021-01-31 | 3088 |
| 2021-02-01 | 3098 |
| 2021-02-02 | 3106 |
| 2021-02-03 | 3113 |
| 2021-02-04 | 3120 |
| 2021-02-05 | 3134 |
| 2021-02-06 | 3147 |
| 2021-02-07 | 3154 |
| 2021-02-08 | 3169 |
| 2021-02-09 | 3183 |
| 2021-02-10 | 3194 |
| 2021-02-11 | 3201 |
| 2021-02-12 | 3214 |
| 2021-02-13 | 3220 |
| 2021-02-14 | 3229 |
| 2021-02-15 | 3240 |
| 2021-02-16 | 3248 |
| 2021-02-17 | 3259 |
| 2021-02-18 | 3270 |
| 2021-02-19 | 3279 |
| 2021-02-20 | 3290 |
| 2021-02-21 | 3300 |
| 2021-02-22 | 3312 |
| 2021-02-23 | 3320 |
| 2021-02-24 | 3328 |
| 2021-02-25 | 3339 |
| 2021-02-26 | 3354 |
| 2021-02-27 | 3367 |
| 2021-02-28 | 3376 |
| 2021-03-01 | 3383 |
| 2021-03-02 | 3394 |
| 2021-03-03 | 3407 |
| 2021-03-04 | 3421 |
| 2021-03-05 | 3428 |
| 2021-03-06 | 3442 |
| 2021-03-07 | 3455 |
| 2021-03-08 | 3467 |
| 2021-03-09 | 3474 |
| 2021-03-10 | 3481 |
| 2021-03-11 | 3491 |
| 2021-03-12 | 3503 |
| 2021-03-13 | 3511 |
| 2021-03-14 | 3519 |
| 2021-03-15 | 3527 |
| 2021-03-16 | 3531 |
| 2021-03-17 | 3539 |
| 2021-03-18 | 3551 |
| 2021-03-19 | 3562 |
| 2021-03-20 | 3568 |
| 2021-03-21 | 3574 |
| 2021-03-22 | 3582 |
| 2021-03-23 | 3590 |
| 2021-03-24 | 3598 |
| 2021-03-25 | 3605 |
| 2021-03-26 | 3614 |
| 2021-03-27 | 3621 |
| 2021-03-28 | 3629 |
| 2021-03-29 | 3639 |
| 2021-03-30 | 3647 |
| 2021-03-31 | 3656 |
| 2021-04-01 | 3666 |
| 2021-04-02 | 3675 |
| 2021-04-03 | 3679 |
| 2021-04-04 | 3686 |
| 2021-04-05 | 3699 |
| 2021-04-06 | 3710 |
| 2021-04-07 | 3718 |
| 2021-04-08 | 3730 |
| 2021-04-09 | 3740 |
| 2021-04-10 | 3748 |
| 2021-04-11 | 3755 |
| 2021-04-12 | 3762 |
| 2021-04-13 | 3768 |
| 2021-04-14 | 3772 |
| 2021-04-15 | 3782 |
| 2021-04-16 | 3788 |
| 2021-04-17 | 3792 |
| 2021-04-18 | 3802 |
| 2021-04-19 | 3809 |
| 2021-04-20 | 3811 |
| 2021-04-21 | 3818 |
| 2021-04-22 | 3826 |
| 2021-04-23 | 3833 |
| 2021-04-24 | 3841 |
| 2021-04-25 | 3845 |
| 2021-04-26 | 3854 |
| 2021-04-27 | 3857 |
| 2021-04-28 | 3863 |
| 2021-04-29 | 3872 |
| 2021-04-30 | 3875 |
| 2021-05-01 | 3881 |
| 2021-05-02 | 3886 |
| 2021-05-03 | 3890 |
| 2021-05-04 | 3894 |
| 2021-05-05 | 3902 |
| 2021-05-06 | 3907 |
| 2021-05-07 | 3912 |
| 2021-05-08 | 3916 |
| 2021-05-09 | 3920 |
| 2021-05-10 | 3923 |
| 2021-05-11 | 3927 |
| 2021-05-12 | 3930 |
| 2021-05-13 | 3933 |
| 2021-05-14 | 3939 |
| 2021-05-15 | 3942 |
| 2021-05-16 | 3945 |
| 2021-05-17 | 3946 |
| 2021-05-18 | 3956 |
| 2021-05-19 | 3962 |
| 2021-05-20 | 3967 |
| 2021-05-21 | 3973 |
| 2021-05-22 | 3980 |
| 2021-05-23 | 3987 |
| 2021-05-24 | 3992 |
| 2021-05-25 | 3996 |
| 2021-05-26 | 4001 |
| 2021-05-27 | 4007 |
| 2021-05-28 | 4012 |
| 2021-05-29 | 4016 |
| 2021-05-30 | 4021 |
| 2021-05-31 | 4027 |
| 2021-06-01 | 4030 |
| 2021-06-02 | 4036 |
| 2021-06-03 | 4038 |
| 2021-06-04 | 4047 |
| 2021-06-05 | 4057 |
| 2021-06-06 | 4065 |
| 2021-06-07 | 4071 |
| 2021-06-08 | 4082 |
| 2021-06-09 | 4092 |
| 2021-06-10 | 4102 |
| 2021-06-11 | 4113 |
| 2021-06-13 | 4121 |
| 2021-06-14 | 4130 |
| 2021-06-15 | 4144 |
| 2021-06-16 | 4148 |
| 2021-06-17 | 4163 |
| 2021-06-18 | 4169 |
| 2021-06-19 | 4186 |
| 2021-06-20 | 4201 |
| 2021-06-21 | 4220 |
| 2021-06-22 | 4237 |
| 2021-06-23 | 4245 |
| 2021-06-24 | 4253 |
| 2021-06-25 | 4267 |
| 2021-06-26 | 4280 |
| 2021-06-27 | 4292 |
| 2021-06-28 | 4308 |
| 2021-06-29 | 4322 |
| 2021-06-30 | 4335 |
| 2021-07-01 | 4347 |
| 2021-07-02 | 4355 |
| 2021-07-03 | 4368 |
| 2021-07-04 | 4382 |
| 2021-07-05 | 4388 |
| 2021-07-06 | 4399 |
| 2021-07-07 | 4409 |
| 2021-07-08 | 4416 |
| 2021-07-09 | 4426 |
| 2021-07-10 | 4431 |
| 2021-07-11 | 4440 |
| 2021-07-12 | 4449 |
| 2021-07-13 | 4460 |
| 2021-07-14 | 4472 |
| 2021-07-15 | 4492 |
| 2021-07-16 | 4505 |
| 2021-07-17 | 4518 |
| 2021-07-18 | 4532 |
| 2021-07-19 | 4544 |
| 2021-07-20 | 4553 |
| 2021-07-21 | 4563 |
| 2021-07-22 | 4571 |
| 2021-07-23 | 4583 |
| 2021-07-24 | 4586 |
| 2021-07-25 | 4594 |
| 2021-07-26 | 4603 |
| 2021-07-27 | 4612 |
| 2021-07-28 | 4621 |
| 2021-07-29 | 4636 |
| 2021-07-30 | 4651 |
| 2021-07-31 | 4664 |
| 2021-08-01 | 4677 |
| 2021-08-02 | 4689 |
| 2021-08-03 | 4697 |
| 2021-08-04 | 4710 |
| 2021-08-05 | 4721 |
| 2021-08-06 | 4731 |
| 2021-08-07 | 4741 |
| 2021-08-08 | 4751 |
| 2021-08-09 | 4769 |
| 2021-08-10 | 4782 |
| 2021-08-11 | 4790 |
| 2021-08-12 | 4800 |
| 2021-08-13 | 4811 |
| 2021-08-14 | 4821 |
| 2021-08-15 | 4832 |
| 2021-08-16 | 4842 |
| 2021-08-17 | 4851 |
| 2021-08-18 | 4863 |
| 2021-08-19 | 4878 |
| 2021-08-20 | 4884 |
| 2021-08-21 | 4892 |
| 2021-08-22 | 4905 |
| 2021-08-23 | 4917 |
| 2021-08-24 | 4928 |
| 2021-08-25 | 4934 |
| 2021-08-26 | 4946 |
| 2021-08-27 | 4965 |
| 2021-08-28 | 4970 |
| 2021-08-29 | 4984 |
| 2021-08-30 | 4996 |
| 2021-08-31 | 5008 |
| 2021-09-01 | 5017 |
| 2021-09-02 | 5024 |
| 2021-09-03 | 5033 |
| 2021-09-04 | 5049 |
| 2021-09-05 | 5065 |
| 2021-09-06 | 5084 |
| 2021-09-07 | 5101 |
| 2021-09-08 | 5112 |
| 2021-09-09 | 5127 |
| 2021-09-10 | 5140 |
| 2021-09-11 | 5154 |
| 2021-09-12 | 5171 |
| 2021-09-13 | 5186 |
| 2021-09-14 | 5196 |
| 2021-09-15 | 5207 |
| 2021-09-16 | 5217 |
| 2021-09-17 | 5228 |
| 2021-09-18 | 5247 |
| 2021-09-19 | 5255 |
| 2021-09-20 | 5268 |
| 2021-09-21 | 5284 |
| 2021-09-22 | 5296 |
| 2021-09-23 | 5307 |
| 2021-09-24 | 5317 |
| 2021-09-25 | 5324 |
| 2021-09-26 | 5333 |
| 2021-09-27 | 5338 |
| 2021-09-28 | 5349 |
| 2021-09-29 | 5360 |
| 2021-09-30 | 5372 |
| 2021-10-01 | 5381 |
| 2021-10-02 | 5393 |
| 2021-10-03 | 5405 |
| 2021-10-04 | 5417 |
| 2021-10-05 | 5430 |
| 2021-10-06 | 5436 |
| 2021-10-07 | 5448 |
| 2021-10-08 | 5452 |
| 2021-10-09 | 5461 |
| 2021-10-10 | 5466 |
| 2021-10-11 | 5474 |
| 2021-10-12 | 5482 |
| 2021-10-13 | 5494 |
| 2021-10-14 | 5505 |
| 2021-10-15 | 5511 |
| 2021-10-16 | 5519 |
| 2021-10-17 | 5527 |
| 2021-10-18 | 5532 |
| 2021-10-19 | 5534 |
| 2021-10-20 | 5544 |
| 2021-10-21 | 5549 |
| 2021-10-22 | 5553 |
| 2021-10-23 | 5556 |
| 2021-10-24 | 5557 |
| 2021-10-25 | 5565 |
| 2021-10-26 | 5568 |
| 2021-10-27 | 5570 |
| 2021-10-28 | 5574 |
| 2021-10-29 | 5578 |
| 2021-10-30 | 5582 |
| 2021-10-31 | 5587 |
| 2021-11-01 | 5596 |
| 2021-11-02 | 5599 |
| 2021-11-03 | 5601 |
| 2021-11-04 | 5606 |
| 2021-11-05 | 5612 |
| 2021-11-06 | 5618 |
| 2021-11-08 | 5621 |
| 2021-11-09 | 5623 |
| 2021-11-10 | 5630 |
| 2021-11-11 | 5637 |
| 2021-11-13 | 5641 |
| 2021-11-14 | 5645 |
| 2021-11-15 | 5648 |
| 2021-11-16 | 5650 |
| 2021-11-17 | 5653 |
| 2021-11-18 | 5659 |
| 2021-11-19 | 5663 |
| 2021-11-20 | 5669 |
| 2021-11-21 | 5671 |
| 2021-11-23 | 5674 |
| 2021-11-24 | 5676 |
| 2021-11-25 | 5682 |
| 2021-11-26 | 5685 |
| 2021-11-27 | 5686 |
| 2021-11-29 | 5687 |
| 2021-11-30 | 5695 |
| 2021-12-01 | 5696 |
| 2021-12-02 | 5698 |
| 2021-12-03 | 5700 |
| 2021-12-06 | 5701 |
| 2021-12-07 | 5703 |
| 2021-12-08 | 5705 |
| 2021-12-11 | 5706 |
| 2021-12-12 | 5707 |
5. (10%) % de mujeres, a nivel municipal, que representan un caso positivo (Número de mujeres positivas en el municipio / Número de casos positivos en ese municipio).
Ahora se muestra el porcentaje de mujeres diagnosticadas con un resultado positivo a Covid-19 en cada municipio. Los resultados son muy variados y solo existen pocos casos donde el porcentaje sea mucho mayor (o inferor) al 40-50%.
# Porcentaje de mujeres caso positivo por municipio ----
ind_mujeres_mun <- covid_data_yuc %>%
filter(clasificacion_final %in% c(1, 2, 3)) %>% # Se filtra por casos positivos
mutate(positivo = ifelse(clasificacion_final %in% c(1, 2, 3), 1, 0)) %>%
group_by(municipio) %>%
summarise(porc_mujeres_positivo = round(sum(sexo == "Mujer")/sum(positivo == 1), 4)*100)
ind_mujeres_mun| municipio | porc_mujeres_positivo |
|---|---|
| ABALÁ | 36.49 |
| ACANCEH | 43.89 |
| AKIL | 46.02 |
| BACA | 40.40 |
| BOKOBÁ | 47.73 |
| BUCTZOTZ | 55.92 |
| CACALCHÉN | 31.94 |
| CALOTMUL | 42.86 |
| CANSAHCAB | 43.08 |
| CANTAMAYEC | 20.00 |
| CELESTÚN | 51.39 |
| CENOTILLO | 57.50 |
| CHACSINKÍN | 38.10 |
| CHANKOM | 54.65 |
| CHAPAB | 45.35 |
| CHEMAX | 56.87 |
| CHICHIMILÁ | 42.38 |
| CHICXULUB PUEBLO | 44.90 |
| CHIKINDZONOT | 70.27 |
| CHOCHOLÁ | 40.38 |
| CHUMAYEL | 58.70 |
| CONKAL | 44.86 |
| CUNCUNUL | 54.95 |
| CUZAMÁ | 42.50 |
| DZÁN | 47.27 |
| DZEMUL | 45.07 |
| DZIDZANTÚN | 36.59 |
| DZILAM DE BRAVO | 26.67 |
| DZILAM GONZÁLEZ | 59.38 |
| DZITÁS | 45.54 |
| DZONCAUICH | 53.33 |
| ESPITA | 49.07 |
| HALACHÓ | 40.13 |
| HOCABÁ | 44.00 |
| HOCTÚN | 43.94 |
| HOMÚN | 39.44 |
| HUHÍ | 39.39 |
| HUNUCMÁ | 43.54 |
| IXIL | 44.74 |
| IZAMAL | 46.35 |
| KANASÍN | 45.19 |
| KANTUNIL | 55.56 |
| KAUA | 35.90 |
| KINCHIL | 40.80 |
| KOPOMÁ | 55.88 |
| MAMA | 38.24 |
| MANÍ | 55.32 |
| MAXCANÚ | 45.92 |
| MAYAPÁN | 16.67 |
| MÉRIDA | 47.76 |
| MOCOCHÁ | 43.48 |
| MOTUL | 44.78 |
| MUNA | 40.74 |
| MUXUPIP | 45.00 |
| NO ESPECIFICADO | 100.00 |
| OPICHÉN | 34.78 |
| OXKUTZCAB | 53.12 |
| PANABÁ | 46.08 |
| PETO | 47.41 |
| PROGRESO | 49.60 |
| QUINTANA ROO | 12.50 |
| RÍO LAGARTOS | 49.57 |
| SACALUM | 41.77 |
| SAMAHIL | 52.67 |
| SAN FELIPE | 49.26 |
| SANAHCAT | 41.67 |
| SANTA ELENA | 48.15 |
| SEYÉ | 41.32 |
| SINANCHÉ | 43.59 |
| SOTUTA | 44.44 |
| SUCILÁ | 55.56 |
| SUDZAL | 16.67 |
| SUMA | 41.67 |
| TAHDZIÚ | 36.36 |
| TAHMEK | 39.71 |
| TEABO | 49.09 |
| TECOH | 45.00 |
| TEKAL DE VENEGAS | 47.37 |
| TEKANTÓ | 63.89 |
| TEKAX | 43.56 |
| TEKIT | 40.48 |
| TEKOM | 52.94 |
| TELCHAC PUEBLO | 45.00 |
| TELCHAC PUERTO | 55.00 |
| TEMAX | 39.22 |
| TEMOZÓN | 45.16 |
| TEPAKÁN | 33.33 |
| TETIZ | 44.00 |
| TEYA | 48.39 |
| TICUL | 47.21 |
| TIMUCUY | 45.61 |
| TINUM | 43.07 |
| TIXCACALCUPUL | 43.24 |
| TIXKOKOB | 44.84 |
| TIXMEHUAC | 46.67 |
| TIXPÉHUAL | 46.15 |
| TIZIMÍN | 44.52 |
| TUNKÁS | 64.29 |
| TZUCACAB | 44.87 |
| UAYMA | 52.42 |
| UCÚ | 29.41 |
| UMÁN | 44.14 |
| VALLADOLID | 45.68 |
| XOCCHEL | 38.10 |
| YAXCABÁ | 48.72 |
| YAXKUKUL | 36.73 |
| YOBAÍN | 15.00 |
2. (10%) Gráfico de barras de los 10 municipios con mayor % de defunciones.
En el siguiente gráfico se muestran los 10 municipios con mayor porcentaje de defunciones. A primera vista resulta impresionante, pero hay que considerar que estos municipios cuentan con muy pocos casos de Covid-19, por lo tanto, confiando en la estadística y la ley de los grandes números, se podría esperar que si contaran con un mayor número de casos, el porcentaje de defunciones convergería a la media, la cual es bastante baja comparado con los porcentajes mostrados en el gráfico.
# Gráfico interactivo 10 municipios mayor % defun ----
ind_def_comorb_mun %>%
ungroup() %>%
slice_max(order_by = porc_defunciones, n = 10) %>%
plot_ly(x = .$municipio, y = .$porc_defunciones,
type = "bar", marker = list(
color = ~porc_defunciones,
size = 10,
opacity = .9,
colorscale = "Bluered",
colorbar = list(
title = "% Defunciones"
))) %>%
layout(title = "Municipios de Yucatán con mayor porcentaje de defunciones",
yaxis = list(title = "Porcentaje %"),
xaxis = list(title = "Top 10 Municipios", showticklabels = FALSE))3. (15%) Gráfico de barras de los 10 municipios con mayor número de casos positivos detectados, divido por hombres y por mujeres.
En este caso, se puede apreciar que los números de casos son bastante parecidos entre hombres y mujeres con una pequeña disminución en las mujeres. Lo que resulta impactante es la gran desproporción entre el número de casos del municipio de Mérida, comparado con los demás municipios.
# Gráfico interactivo 10 municipios mayor casos positivos por sexo ----
plt_casos_positivos_sexo <- covid_data_yuc %>%
group_by(municipio, sexo) %>%
summarise(num_casos_positivos = sum(clasificacion_final %in% c(1, 2, 3))) %>%
ungroup() %>%
group_by(municipio) %>%
mutate(num_casos_positivos_total = sum(num_casos_positivos)) %>%
ungroup() %>%
slice_max(order_by = num_casos_positivos_total, n = 20) %>%
ggplot(aes(x = reorder(municipio, -num_casos_positivos), y = num_casos_positivos, fill = sexo, text = paste0("<br><b>Municipio: </b>", municipio, "</br>",
"<b>Número de casos positivos: </b>", num_casos_positivos))) +
geom_bar(stat = "identity", position = "dodge", alpha = 0.5) +
scale_fill_manual(values = c("Mujer" = "coral", "Hombre" = "blue")) +
labs(title = "Municipios de Yucatán con mayor número de casos positivos",
x = "Top 10 municipios",
y = "Número de casos (+)",
fill = "Sexo",
caption = glue::glue("Última actualización: {unique(covid_data_yuc$fecha_actualizacion)}")) +
theme_minimal() +
theme(axis.text.x = element_blank(),
axis.ticks.x = element_blank())
ggplotly(p = plt_casos_positivos_sexo, tooltip = "text")4. (15%) Gráfico de líneas que representa el número acumulado de defunciones a nivel estatal por día. Al desplazar el cursor sobre la línea, se debe de mostrar la cantidad representada en la línea.
Ahora se muestra el número de defunciones acumuladas por día a nivel estatal.
Una pequeña nota técnica: Coloqué dos gráficos ya que en el primero no fue posible modificar las cajas de texto que se muestran al colocar el cursor (modificarlas para que se muestren como en el segundo gráfico), ya que al modificarlas desaparecía la línea pero sí se mostraban las cajas al desplazar el cursor. Por lo tanto, hice un poco de trampa en el segundo gráfico, ya que el problema no ocurría cuando se utilizaba geom_point().
# Gráfico de líneas num acumulado de defunciones a nivel estatal ----
plt_def_acum <- ind_defun_est %>%
ggplot(aes(x = fecha_def, y = defunciones_dia)) +
geom_line(color = "#F68011") +
scale_x_date(date_breaks = "1 month", date_labels = "%B %Y") +
scale_y_continuous(breaks = scales::pretty_breaks(n = 10)) +
labs(title = "Defunciones por Covid-19 acumuladas por día\nen el estado de Yucatán (Info presentable)",
x = "",
y = "Número de defunciones") +
theme_minimal() +
theme(axis.text.x = element_text(angle = 90))
ggplotly(p = plt_def_acum)plt_def_acum_info <- ind_defun_est %>%
mutate(info = paste0("<br><b>Fecha: </b>", format(fecha_def, format = "%d %B %Y"),
"<br><b>Número de defunciones: </b>", defunciones_dia)) %>%
ggplot(aes(x = fecha_def, y = defunciones_dia, text = info)) +
geom_point(color = "#6EE1A5") +
scale_x_date(date_breaks = "1 month", date_labels = "%B %Y") +
scale_y_continuous(breaks = scales::pretty_breaks(n = 10)) +
labs(title = "Defunciones por Covid-19 acumuladas por día\nen el estado de Yucatán (Info presentable)",
x = "",
y = "Número de defunciones") +
theme_minimal() +
theme(axis.text.x = element_text(angle = 90))
ggplotly(p = plt_def_acum_info, tooltip = "text")5. (20%) Mapa que muestre la distribución espacial, por municipio, del % de defunciones. Utilizar el corte por cuantiles. Al situar el cursor sobre el municipio, se debe de desplegar el % de defunciones y el total de casos de defunciones del correspondiente.
Por último, el siguiente mapa muestra el porcentaje de defunciones y el total de casos por municipio. Como ya se había comentado anteriormente, la mayoría de los municipios se encuentran en el intervalo de 0.053% a 21.3 %.
# Mapa % defunciones por municipio ----
# Datos mapa
mapa_yuc <- rgdal::readOGR(dsn = "./maps/yucatan_qgis", layer = "municipios_yucatan", encoding = "UTF-8")## OGR data source with driver: ESRI Shapefile
## Source: "C:\Users\Erick\Documents\projects\final_prog\maps\yucatan_qgis", layer: "municipios_yucatan"
## with 106 features
## It has 4 fields
# Merge de datos covid y mapa
mapa_yuc@data <- merge(x = mapa_yuc@data,
y = ind_def_comorb_mun,
by.x = "CVE_MUN",
by.y = "municipio_res",
sort = FALSE)
# Se crea una variable de texto para los popups del mapa
mapa_yuc@data <- mapa_yuc@data %>%
mutate(popup_info = paste0("<br><b>Municipio: </b>", municipio,
"<br><b>Total de casos positivos: </b>", num_casos_positivos,
"<br><b>Total de defunciones: </b>", num_defunciones,
"<br><b>Porcentaje de defunciones por Covid-19: </b>", porc_defunciones, " %"))
# Función para obtener los valores de los cuantiles con base en la función cut
cut_values <- function(vector, breaks = 5){
na.omit(
unique(
as.numeric(
unlist(
stringr::str_extract_all(
levels(
cut(vector, 5) # función cut
),
"[0-9]*\\.?\\d*")
)
)
)
)
}
# Cortes
cortes <- cut_values(mapa_yuc@data$porc_defunciones)
cortes <- c(0, cortes)
colores <- colorBin(palette = "plasma",
domain = as.numeric(mapa_yuc@data$porc_defunciones),
na.color = "transparent",
bins = cortes
)
leaflet(mapa_yuc) %>%
addTiles() %>%
addPolygons(label = mapa_yuc@data$municipio,
popup = mapa_yuc@data$popup_info,
fillColor = colores(mapa_yuc@data$porc_defunciones),
fillOpacity = 0.9) %>%
addLegend("bottomright", pal = colores, values = ~porc_defunciones,
title = "Porcentaje de defunciones",
opacity = 1 )