#install.packages("tidyverse")
#install.packages("readxl")
#install.packages("janitor")
#install.packages("gt")
#install.packages("tidyverse")
#install.packages("janitor")
#install.packages("readxl")
#install.packages("gt")
#install.packages("lubridate")
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.1 ✔ stringr 1.5.2
## ✔ ggplot2 4.0.0 ✔ tibble 3.3.0
## ✔ lubridate 1.9.4 ✔ tidyr 1.3.1
## ✔ purrr 1.1.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(readxl)
library(janitor)
##
## Adjuntando el paquete: 'janitor'
##
## The following objects are masked from 'package:stats':
##
## chisq.test, fisher.test
library(gt)
library(tidyverse)
library(janitor)
library(readxl)
library(gt)
library(lubridate)
data_path <- "2. covid_example_data.xlsx"
df_raw <- read_excel(data_path) %>% clean_names()
glimpse(df_raw)
## Rows: 82,101
## Columns: 31
## $ pid <chr> "3a85e6992a5ac52f", "c6b5281d5fc50b96", "53495a…
## $ reprt_creationdt_false <dttm> 2020-03-22, 2020-02-01, 2020-02-10, 2020-03-20…
## $ case_dob_false <dttm> 2004-11-08, 1964-06-07, 1944-04-06, 1964-06-25…
## $ case_age <dbl> 16, 57, 77, 57, 56, 65, 47, 61, 36, 42, 74, 27,…
## $ case_gender <chr> "Male", "Male", "Female", "Female", "Male", "Ma…
## $ case_race <chr> "WHITE", "WHITE", "BLACK", "BLACK", "WHITE", "B…
## $ case_eth <chr> "NON-HISPANIC/LATINO", "NON-HISPANIC/LATINO", "…
## $ case_zip <dbl> 30308, 30308, 30315, 30213, 30004, 30314, 30313…
## $ contact_id <chr> "Yes-Symptomatic", "Yes-Symptomatic", "Yes-Symp…
## $ sym_startdt_false <dttm> 2020-03-20, 2020-01-28, 2020-02-10, 2021-05-19…
## $ sym_fever <chr> "Yes", "No", "Yes", "No", "Yes", "Yes", "No", "…
## $ sym_subjfever <chr> "Yes", "No", NA, "Yes", "Yes", "Yes", "No", "Ye…
## $ sym_myalgia <chr> "No", "Yes", "Yes", "Yes", "Yes", "No", "Unk", …
## $ sym_losstastesmell <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, "Yes", NA, …
## $ sym_sorethroat <chr> "Yes", "No", "Yes", "Yes", "No", "Unk", "Yes", …
## $ sym_cough <chr> "Yes", "Yes", "Yes", "Yes", "Yes", "Yes", "Yes"…
## $ sym_headache <chr> "Yes", "No", NA, "Yes", "No", "Unk", "Yes", "No…
## $ sym_resolved <chr> "No, still symptomatic", "No, still symptomatic…
## $ sym_resolveddt_false <dttm> NA, NA, NA, NA, NA, 2020-02-21, NA, NA, NA, NA…
## $ contact_household <chr> "Yes", "No", NA, "No", "No", "No", "No", "No", …
## $ hospitalized <chr> "No", "No", "Yes", NA, "Yes", "Yes", "Yes", "No…
## $ hosp_admidt_false <dttm> NA, NA, 2020-02-08, NA, 2020-02-26, 2020-01-27…
## $ hosp_dischdt_false <dttm> NA, NA, NA, NA, NA, 2020-02-21, NA, NA, NA, 20…
## $ died <chr> "No", "No", "No", "No", NA, "Yes", "No", NA, "N…
## $ died_covid <chr> "No", "No", "No", "No", NA, "Yes", "No", NA, "N…
## $ died_dt_false <dttm> NA, NA, NA, NA, NA, 2020-02-21, NA, NA, NA, NA…
## $ confirmed_case <chr> "Yes", "Yes", "Yes", "Yes", "Yes", "Yes", "Yes"…
## $ covid_dx <chr> "Confirmed", "Confirmed", "Confirmed", "Confirm…
## $ pos_sampledt_false <dttm> 2020-03-22, 2020-02-01, 2020-02-10, 2021-01-17…
## $ latitude_jitt <dbl> 33.776645460, 33.780510140, 33.730233310, 33.55…
## $ longitude_jitt <dbl> -84.385685230, -84.389474740, -84.384251890, -8…
n_rows <- nrow(df_raw)
n_cols <- ncol(df_raw)
cat("Filas:", n_rows, "\nColumnas:", n_cols, "\n")
## Filas: 82101
## Columnas: 31
head(df_raw)
## # A tibble: 6 × 31
## pid reprt_creationdt_false case_dob_false case_age case_gender
## <chr> <dttm> <dttm> <dbl> <chr>
## 1 3a85e6992a5ac… 2020-03-22 00:00:00 2004-11-08 00:00:00 16 Male
## 2 c6b5281d5fc50… 2020-02-01 00:00:00 1964-06-07 00:00:00 57 Male
## 3 53495ad0dca4e… 2020-02-10 00:00:00 1944-04-06 00:00:00 77 Female
## 4 2948a265da0d0… 2020-03-20 00:00:00 1964-06-25 00:00:00 57 Female
## 5 a5524aadd1ca0… 2020-02-26 00:00:00 1964-12-21 00:00:00 56 Male
## 6 db14eeabe531f… 2020-02-11 00:00:00 1956-06-21 00:00:00 65 Male
## # ℹ 26 more variables: case_race <chr>, case_eth <chr>, case_zip <dbl>,
## # contact_id <chr>, sym_startdt_false <dttm>, sym_fever <chr>,
## # sym_subjfever <chr>, sym_myalgia <chr>, sym_losstastesmell <chr>,
## # sym_sorethroat <chr>, sym_cough <chr>, sym_headache <chr>,
## # sym_resolved <chr>, sym_resolveddt_false <dttm>, contact_household <chr>,
## # hospitalized <chr>, hosp_admidt_false <dttm>, hosp_dischdt_false <dttm>,
## # died <chr>, died_covid <chr>, died_dt_false <dttm>, confirmed_case <chr>, …
# Ver estructura general de la base
glimpse(df_raw)
## Rows: 82,101
## Columns: 31
## $ pid <chr> "3a85e6992a5ac52f", "c6b5281d5fc50b96", "53495a…
## $ reprt_creationdt_false <dttm> 2020-03-22, 2020-02-01, 2020-02-10, 2020-03-20…
## $ case_dob_false <dttm> 2004-11-08, 1964-06-07, 1944-04-06, 1964-06-25…
## $ case_age <dbl> 16, 57, 77, 57, 56, 65, 47, 61, 36, 42, 74, 27,…
## $ case_gender <chr> "Male", "Male", "Female", "Female", "Male", "Ma…
## $ case_race <chr> "WHITE", "WHITE", "BLACK", "BLACK", "WHITE", "B…
## $ case_eth <chr> "NON-HISPANIC/LATINO", "NON-HISPANIC/LATINO", "…
## $ case_zip <dbl> 30308, 30308, 30315, 30213, 30004, 30314, 30313…
## $ contact_id <chr> "Yes-Symptomatic", "Yes-Symptomatic", "Yes-Symp…
## $ sym_startdt_false <dttm> 2020-03-20, 2020-01-28, 2020-02-10, 2021-05-19…
## $ sym_fever <chr> "Yes", "No", "Yes", "No", "Yes", "Yes", "No", "…
## $ sym_subjfever <chr> "Yes", "No", NA, "Yes", "Yes", "Yes", "No", "Ye…
## $ sym_myalgia <chr> "No", "Yes", "Yes", "Yes", "Yes", "No", "Unk", …
## $ sym_losstastesmell <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, "Yes", NA, …
## $ sym_sorethroat <chr> "Yes", "No", "Yes", "Yes", "No", "Unk", "Yes", …
## $ sym_cough <chr> "Yes", "Yes", "Yes", "Yes", "Yes", "Yes", "Yes"…
## $ sym_headache <chr> "Yes", "No", NA, "Yes", "No", "Unk", "Yes", "No…
## $ sym_resolved <chr> "No, still symptomatic", "No, still symptomatic…
## $ sym_resolveddt_false <dttm> NA, NA, NA, NA, NA, 2020-02-21, NA, NA, NA, NA…
## $ contact_household <chr> "Yes", "No", NA, "No", "No", "No", "No", "No", …
## $ hospitalized <chr> "No", "No", "Yes", NA, "Yes", "Yes", "Yes", "No…
## $ hosp_admidt_false <dttm> NA, NA, 2020-02-08, NA, 2020-02-26, 2020-01-27…
## $ hosp_dischdt_false <dttm> NA, NA, NA, NA, NA, 2020-02-21, NA, NA, NA, 20…
## $ died <chr> "No", "No", "No", "No", NA, "Yes", "No", NA, "N…
## $ died_covid <chr> "No", "No", "No", "No", NA, "Yes", "No", NA, "N…
## $ died_dt_false <dttm> NA, NA, NA, NA, NA, 2020-02-21, NA, NA, NA, NA…
## $ confirmed_case <chr> "Yes", "Yes", "Yes", "Yes", "Yes", "Yes", "Yes"…
## $ covid_dx <chr> "Confirmed", "Confirmed", "Confirmed", "Confirm…
## $ pos_sampledt_false <dttm> 2020-03-22, 2020-02-01, 2020-02-10, 2021-01-17…
## $ latitude_jitt <dbl> 33.776645460, 33.780510140, 33.730233310, 33.55…
## $ longitude_jitt <dbl> -84.385685230, -84.389474740, -84.384251890, -8…
# Número de filas y columnas
num_filas <- nrow(df_raw)
num_columnas <- ncol(df_raw)
cat("\n--- Dimensiones del conjunto de datos ---\n")
##
## --- Dimensiones del conjunto de datos ---
cat("Número de filas (observaciones):", num_filas, "\n")
## Número de filas (observaciones): 82101
cat("Número de columnas (variables):", num_columnas, "\n")
## Número de columnas (variables): 31
# Ver nombres de las variables principales
cat("\n--- Variables disponibles ---\n")
##
## --- Variables disponibles ---
print(names(df_raw))
## [1] "pid" "reprt_creationdt_false" "case_dob_false"
## [4] "case_age" "case_gender" "case_race"
## [7] "case_eth" "case_zip" "contact_id"
## [10] "sym_startdt_false" "sym_fever" "sym_subjfever"
## [13] "sym_myalgia" "sym_losstastesmell" "sym_sorethroat"
## [16] "sym_cough" "sym_headache" "sym_resolved"
## [19] "sym_resolveddt_false" "contact_household" "hospitalized"
## [22] "hosp_admidt_false" "hosp_dischdt_false" "died"
## [25] "died_covid" "died_dt_false" "confirmed_case"
## [28] "covid_dx" "pos_sampledt_false" "latitude_jitt"
## [31] "longitude_jitt"
# Detectar valores faltantes por variable
faltantes <- df_raw %>%
summarise(across(everything(), ~ sum(is.na(.)))) %>%
pivot_longer(everything(), names_to = "variable", values_to = "n_faltantes") %>%
arrange(desc(n_faltantes))
cat("\n--- Cantidad de valores faltantes por variable ---\n")
##
## --- Cantidad de valores faltantes por variable ---
print(faltantes)
## # A tibble: 31 × 2
## variable n_faltantes
## <chr> <int>
## 1 died_dt_false 80394
## 2 hosp_dischdt_false 78600
## 3 hosp_admidt_false 77115
## 4 sym_resolveddt_false 65799
## 5 sym_losstastesmell 50724
## 6 died_covid 42302
## 7 sym_resolved 42294
## 8 sym_subjfever 37908
## 9 sym_startdt_false 37480
## 10 died 36832
## # ℹ 21 more rows
# Si existe alguna columna con fechas, identificar rango temporal
if(any(str_detect(names(df_raw), "date|fecha"))) {
var_fecha <- names(df_raw)[str_detect(names(df_raw), "date|fecha")][1]
rango_fechas <- range(df_raw[[var_fecha]], na.rm = TRUE)
cat("\n--- Rango temporal de los datos ---\n")
cat("Variable de fecha:", var_fecha, "\n")
cat("Desde:", as.character(rango_fechas[1]), "hasta:", as.character(rango_fechas[2]), "\n")
} else {
cat("\nNo se identificaron columnas de tipo fecha.\n")
}
##
## No se identificaron columnas de tipo fecha.
# --- Texto interpretativo (listo para incluir en el informe) ---
cat("\n--- Descripción e interpretación ---\n")
##
## --- Descripción e interpretación ---
cat("La base de datos contiene", num_filas, "registros y", num_columnas, "variables, ",
"correspondientes a casos individuales de COVID-19.\n",
"Incluye información demográfica (por ejemplo: edad, sexo, región o departamento), ",
"clínica (como estado del paciente, síntomas o resultado de la prueba), ",
"y posiblemente variables de hospitalización o fallecimiento.\n",
"Este tipo de información es fundamental para un análisis descriptivo, ",
"ya que permite identificar patrones de contagio, distribución por edad o género, ",
"tendencias temporales y la severidad de los casos reportados.\n",
"Asimismo, el recuento de valores faltantes ayuda a evaluar la calidad del registro ",
"y decidir estrategias de depuración o imputación de datos antes del análisis estadístico.\n")
## La base de datos contiene 82101 registros y 31 variables, correspondientes a casos individuales de COVID-19.
## Incluye información demográfica (por ejemplo: edad, sexo, región o departamento), clínica (como estado del paciente, síntomas o resultado de la prueba), y posiblemente variables de hospitalización o fallecimiento.
## Este tipo de información es fundamental para un análisis descriptivo, ya que permite identificar patrones de contagio, distribución por edad o género, tendencias temporales y la severidad de los casos reportados.
## Asimismo, el recuento de valores faltantes ayuda a evaluar la calidad del registro y decidir estrategias de depuración o imputación de datos antes del análisis estadístico.
No se identificaron columnas de tipo fecha.
— Descripción e interpretación — La base de datos contiene 82101 registros y 31 variables, correspondientes a casos individuales de COVID-19. Incluye información demográfica (por ejemplo: edad, sexo, región o departamento), clínica (como estado del paciente, síntomas o resultado de la prueba), y posiblemente variables de hospitalización o fallecimiento. Este tipo de información es fundamental para un análisis descriptivo, ya que permite identificar patrones de contagio, distribución por edad o género, tendencias temporales y la severidad de los casos reportados. Asimismo, el recuento de valores faltantes ayuda a evaluar la calidad del registro y decidir estrategias de depuración o imputación de datos antes del análisis estadístico.
df <- df_raw
# Detectar columna de fecha entre nombres comunes
possible_date_cols <- c("reprt_creationdt_false", "report_creationdt", "report_date", "report_creationdt", "report_date_time", "rep_date", "report_date", "created_date", "creation_date", "reporting_date")
date_col <- intersect(names(df), possible_date_cols) %>% first()
# si no encontró, intenta detectar la primera columna con clase fecha o con 'date' en el nombre
if (is.null(date_col) || is.na(date_col)) {
date_col <- names(df)[which(sapply(df, function(x) inherits(x, "Date") || inherits(x, "POSIXt")))[1]]
}
if (is.na(date_col) || is.null(date_col)) {
date_col <- names(df)[str_detect(names(df), "date|creation|created|report")][1]
}
# Parsear la columna de fecha si existe
if (!is.null(date_col) && !is.na(date_col)) {
df <- df %>%
mutate(report_date = lubridate::ymd_hms(.data[[date_col]], quiet = TRUE)) %>%
mutate(report_date = if_else(is.na(report_date),
lubridate::ymd(.data[[date_col]], quiet = TRUE),
report_date)) %>%
mutate(report_date = as_date(report_date))
} else {
df <- df %>% mutate(report_date = as_date(NA))
}
# Variables demográficas - normalizar nombres si existen
# Asumimos nombres: case_gender, case_race, case_eth, age (o age_years)
gender_col <- names(df)[str_detect(names(df), "case_gender|gender|sex")][1]
race_col <- names(df)[str_detect(names(df), "case_race|race")][1]
eth_col <- names(df)[str_detect(names(df), "case_eth|eth")][1]
age_col <- names(df)[str_detect(names(df), "age$|age_y|age_years|patient_age")][1]
# Crear age_group con los intervalos pedidos: 0–17, 18–29, 30–44, 45–64, 65+
df <- df %>%
mutate(
age_num = suppressWarnings(as.numeric(.data[[age_col]])),
age_group = case_when(
!is.na(age_num) & age_num <= 17 ~ "0-17",
!is.na(age_num) & age_num >= 18 & age_num <= 29 ~ "18-29",
!is.na(age_num) & age_num >= 30 & age_num <= 44 ~ "30-44",
!is.na(age_num) & age_num >= 45 & age_num <= 64 ~ "45-64",
!is.na(age_num) & age_num >= 65 ~ "65+",
TRUE ~ NA_character_
),
case_gender = if(!is.null(gender_col)) as.character(.data[[gender_col]]) else NA_character_,
case_race = if(!is.null(race_col)) as.character(.data[[race_col]]) else NA_character_,
case_eth = if(!is.null(eth_col)) as.character(.data[[eth_col]]) else NA_character_
)
# Distribución por gender, race, eth (n y %)
tab_gender <- df %>%
filter(!is.na(case_gender)) %>%
count(case_gender) %>%
mutate(pct = n / sum(n) * 100)
tab_race <- df %>%
filter(!is.na(case_race)) %>%
count(case_race) %>%
mutate(pct = n / sum(n) * 100)
tab_eth <- df %>%
filter(!is.na(case_eth)) %>%
count(case_eth) %>%
mutate(pct = n / sum(n) * 100)
# Tabla cruzada age_group x case_gender
cross_age_gender <- df %>%
filter(!is.na(age_group) & !is.na(case_gender)) %>%
count(age_group, case_gender) %>%
group_by(age_group) %>%
mutate(pct = n / sum(n) * 100) %>%
ungroup()
# Mostrar con gt (bonito)
list("Distribución por género" = gt::gt(tab_gender),
"Distribución por raza" = gt::gt(tab_race),
"Distribución por etnicidad" = gt::gt(tab_eth),
"Cruzada edad x género" = gt::gt(cross_age_gender))
## $`Distribución por género`
## <div id="gmfbrsjqzr" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
## <style>#gmfbrsjqzr table {
## font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
## -webkit-font-smoothing: antialiased;
## -moz-osx-font-smoothing: grayscale;
## }
##
## #gmfbrsjqzr thead, #gmfbrsjqzr tbody, #gmfbrsjqzr tfoot, #gmfbrsjqzr tr, #gmfbrsjqzr td, #gmfbrsjqzr th {
## border-style: none;
## }
##
## #gmfbrsjqzr p {
## margin: 0;
## padding: 0;
## }
##
## #gmfbrsjqzr .gt_table {
## display: table;
## border-collapse: collapse;
## line-height: normal;
## margin-left: auto;
## margin-right: auto;
## color: #333333;
## font-size: 16px;
## font-weight: normal;
## font-style: normal;
## background-color: #FFFFFF;
## width: auto;
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #A8A8A8;
## border-right-style: none;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #A8A8A8;
## border-left-style: none;
## border-left-width: 2px;
## border-left-color: #D3D3D3;
## }
##
## #gmfbrsjqzr .gt_caption {
## padding-top: 4px;
## padding-bottom: 4px;
## }
##
## #gmfbrsjqzr .gt_title {
## color: #333333;
## font-size: 125%;
## font-weight: initial;
## padding-top: 4px;
## padding-bottom: 4px;
## padding-left: 5px;
## padding-right: 5px;
## border-bottom-color: #FFFFFF;
## border-bottom-width: 0;
## }
##
## #gmfbrsjqzr .gt_subtitle {
## color: #333333;
## font-size: 85%;
## font-weight: initial;
## padding-top: 3px;
## padding-bottom: 5px;
## padding-left: 5px;
## padding-right: 5px;
## border-top-color: #FFFFFF;
## border-top-width: 0;
## }
##
## #gmfbrsjqzr .gt_heading {
## background-color: #FFFFFF;
## text-align: center;
## border-bottom-color: #FFFFFF;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## }
##
## #gmfbrsjqzr .gt_bottom_border {
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## }
##
## #gmfbrsjqzr .gt_col_headings {
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## }
##
## #gmfbrsjqzr .gt_col_heading {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: normal;
## text-transform: inherit;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## vertical-align: bottom;
## padding-top: 5px;
## padding-bottom: 6px;
## padding-left: 5px;
## padding-right: 5px;
## overflow-x: hidden;
## }
##
## #gmfbrsjqzr .gt_column_spanner_outer {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: normal;
## text-transform: inherit;
## padding-top: 0;
## padding-bottom: 0;
## padding-left: 4px;
## padding-right: 4px;
## }
##
## #gmfbrsjqzr .gt_column_spanner_outer:first-child {
## padding-left: 0;
## }
##
## #gmfbrsjqzr .gt_column_spanner_outer:last-child {
## padding-right: 0;
## }
##
## #gmfbrsjqzr .gt_column_spanner {
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## vertical-align: bottom;
## padding-top: 5px;
## padding-bottom: 5px;
## overflow-x: hidden;
## display: inline-block;
## width: 100%;
## }
##
## #gmfbrsjqzr .gt_spanner_row {
## border-bottom-style: hidden;
## }
##
## #gmfbrsjqzr .gt_group_heading {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## text-transform: inherit;
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## vertical-align: middle;
## text-align: left;
## }
##
## #gmfbrsjqzr .gt_empty_group_heading {
## padding: 0.5px;
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## vertical-align: middle;
## }
##
## #gmfbrsjqzr .gt_from_md > :first-child {
## margin-top: 0;
## }
##
## #gmfbrsjqzr .gt_from_md > :last-child {
## margin-bottom: 0;
## }
##
## #gmfbrsjqzr .gt_row {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## margin: 10px;
## border-top-style: solid;
## border-top-width: 1px;
## border-top-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## vertical-align: middle;
## overflow-x: hidden;
## }
##
## #gmfbrsjqzr .gt_stub {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## text-transform: inherit;
## border-right-style: solid;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #gmfbrsjqzr .gt_stub_row_group {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## text-transform: inherit;
## border-right-style: solid;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## padding-left: 5px;
## padding-right: 5px;
## vertical-align: top;
## }
##
## #gmfbrsjqzr .gt_row_group_first td {
## border-top-width: 2px;
## }
##
## #gmfbrsjqzr .gt_row_group_first th {
## border-top-width: 2px;
## }
##
## #gmfbrsjqzr .gt_summary_row {
## color: #333333;
## background-color: #FFFFFF;
## text-transform: inherit;
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #gmfbrsjqzr .gt_first_summary_row {
## border-top-style: solid;
## border-top-color: #D3D3D3;
## }
##
## #gmfbrsjqzr .gt_first_summary_row.thick {
## border-top-width: 2px;
## }
##
## #gmfbrsjqzr .gt_last_summary_row {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## }
##
## #gmfbrsjqzr .gt_grand_summary_row {
## color: #333333;
## background-color: #FFFFFF;
## text-transform: inherit;
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #gmfbrsjqzr .gt_first_grand_summary_row {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## border-top-style: double;
## border-top-width: 6px;
## border-top-color: #D3D3D3;
## }
##
## #gmfbrsjqzr .gt_last_grand_summary_row_top {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## border-bottom-style: double;
## border-bottom-width: 6px;
## border-bottom-color: #D3D3D3;
## }
##
## #gmfbrsjqzr .gt_striped {
## background-color: rgba(128, 128, 128, 0.05);
## }
##
## #gmfbrsjqzr .gt_table_body {
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## }
##
## #gmfbrsjqzr .gt_footnotes {
## color: #333333;
## background-color: #FFFFFF;
## border-bottom-style: none;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 2px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## }
##
## #gmfbrsjqzr .gt_footnote {
## margin: 0px;
## font-size: 90%;
## padding-top: 4px;
## padding-bottom: 4px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #gmfbrsjqzr .gt_sourcenotes {
## color: #333333;
## background-color: #FFFFFF;
## border-bottom-style: none;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 2px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## }
##
## #gmfbrsjqzr .gt_sourcenote {
## font-size: 90%;
## padding-top: 4px;
## padding-bottom: 4px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #gmfbrsjqzr .gt_left {
## text-align: left;
## }
##
## #gmfbrsjqzr .gt_center {
## text-align: center;
## }
##
## #gmfbrsjqzr .gt_right {
## text-align: right;
## font-variant-numeric: tabular-nums;
## }
##
## #gmfbrsjqzr .gt_font_normal {
## font-weight: normal;
## }
##
## #gmfbrsjqzr .gt_font_bold {
## font-weight: bold;
## }
##
## #gmfbrsjqzr .gt_font_italic {
## font-style: italic;
## }
##
## #gmfbrsjqzr .gt_super {
## font-size: 65%;
## }
##
## #gmfbrsjqzr .gt_footnote_marks {
## font-size: 75%;
## vertical-align: 0.4em;
## position: initial;
## }
##
## #gmfbrsjqzr .gt_asterisk {
## font-size: 100%;
## vertical-align: 0;
## }
##
## #gmfbrsjqzr .gt_indent_1 {
## text-indent: 5px;
## }
##
## #gmfbrsjqzr .gt_indent_2 {
## text-indent: 10px;
## }
##
## #gmfbrsjqzr .gt_indent_3 {
## text-indent: 15px;
## }
##
## #gmfbrsjqzr .gt_indent_4 {
## text-indent: 20px;
## }
##
## #gmfbrsjqzr .gt_indent_5 {
## text-indent: 25px;
## }
##
## #gmfbrsjqzr .katex-display {
## display: inline-flex !important;
## margin-bottom: 0.75em !important;
## }
##
## #gmfbrsjqzr div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {
## height: 0px !important;
## }
## </style>
## <table class="gt_table" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
## <thead>
## <tr class="gt_col_headings">
## <th class="gt_col_heading gt_columns_bottom_border gt_left" rowspan="1" colspan="1" scope="col" id="case_gender">case_gender</th>
## <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="n">n</th>
## <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="pct">pct</th>
## </tr>
## </thead>
## <tbody class="gt_table_body">
## <tr><td headers="case_gender" class="gt_row gt_left">Female</td>
## <td headers="n" class="gt_row gt_right">43299</td>
## <td headers="pct" class="gt_row gt_right">52.7791999</td></tr>
## <tr><td headers="case_gender" class="gt_row gt_left">Male</td>
## <td headers="n" class="gt_row gt_right">38393</td>
## <td headers="pct" class="gt_row gt_right">46.7990443</td></tr>
## <tr><td headers="case_gender" class="gt_row gt_left">Unknown</td>
## <td headers="n" class="gt_row gt_right">346</td>
## <td headers="pct" class="gt_row gt_right">0.4217558</td></tr>
## </tbody>
##
## </table>
## </div>
##
## $`Distribución por raza`
## <div id="vdhowgsvdz" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
## <style>#vdhowgsvdz table {
## font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
## -webkit-font-smoothing: antialiased;
## -moz-osx-font-smoothing: grayscale;
## }
##
## #vdhowgsvdz thead, #vdhowgsvdz tbody, #vdhowgsvdz tfoot, #vdhowgsvdz tr, #vdhowgsvdz td, #vdhowgsvdz th {
## border-style: none;
## }
##
## #vdhowgsvdz p {
## margin: 0;
## padding: 0;
## }
##
## #vdhowgsvdz .gt_table {
## display: table;
## border-collapse: collapse;
## line-height: normal;
## margin-left: auto;
## margin-right: auto;
## color: #333333;
## font-size: 16px;
## font-weight: normal;
## font-style: normal;
## background-color: #FFFFFF;
## width: auto;
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #A8A8A8;
## border-right-style: none;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #A8A8A8;
## border-left-style: none;
## border-left-width: 2px;
## border-left-color: #D3D3D3;
## }
##
## #vdhowgsvdz .gt_caption {
## padding-top: 4px;
## padding-bottom: 4px;
## }
##
## #vdhowgsvdz .gt_title {
## color: #333333;
## font-size: 125%;
## font-weight: initial;
## padding-top: 4px;
## padding-bottom: 4px;
## padding-left: 5px;
## padding-right: 5px;
## border-bottom-color: #FFFFFF;
## border-bottom-width: 0;
## }
##
## #vdhowgsvdz .gt_subtitle {
## color: #333333;
## font-size: 85%;
## font-weight: initial;
## padding-top: 3px;
## padding-bottom: 5px;
## padding-left: 5px;
## padding-right: 5px;
## border-top-color: #FFFFFF;
## border-top-width: 0;
## }
##
## #vdhowgsvdz .gt_heading {
## background-color: #FFFFFF;
## text-align: center;
## border-bottom-color: #FFFFFF;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## }
##
## #vdhowgsvdz .gt_bottom_border {
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## }
##
## #vdhowgsvdz .gt_col_headings {
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## }
##
## #vdhowgsvdz .gt_col_heading {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: normal;
## text-transform: inherit;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## vertical-align: bottom;
## padding-top: 5px;
## padding-bottom: 6px;
## padding-left: 5px;
## padding-right: 5px;
## overflow-x: hidden;
## }
##
## #vdhowgsvdz .gt_column_spanner_outer {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: normal;
## text-transform: inherit;
## padding-top: 0;
## padding-bottom: 0;
## padding-left: 4px;
## padding-right: 4px;
## }
##
## #vdhowgsvdz .gt_column_spanner_outer:first-child {
## padding-left: 0;
## }
##
## #vdhowgsvdz .gt_column_spanner_outer:last-child {
## padding-right: 0;
## }
##
## #vdhowgsvdz .gt_column_spanner {
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## vertical-align: bottom;
## padding-top: 5px;
## padding-bottom: 5px;
## overflow-x: hidden;
## display: inline-block;
## width: 100%;
## }
##
## #vdhowgsvdz .gt_spanner_row {
## border-bottom-style: hidden;
## }
##
## #vdhowgsvdz .gt_group_heading {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## text-transform: inherit;
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## vertical-align: middle;
## text-align: left;
## }
##
## #vdhowgsvdz .gt_empty_group_heading {
## padding: 0.5px;
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## vertical-align: middle;
## }
##
## #vdhowgsvdz .gt_from_md > :first-child {
## margin-top: 0;
## }
##
## #vdhowgsvdz .gt_from_md > :last-child {
## margin-bottom: 0;
## }
##
## #vdhowgsvdz .gt_row {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## margin: 10px;
## border-top-style: solid;
## border-top-width: 1px;
## border-top-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## vertical-align: middle;
## overflow-x: hidden;
## }
##
## #vdhowgsvdz .gt_stub {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## text-transform: inherit;
## border-right-style: solid;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #vdhowgsvdz .gt_stub_row_group {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## text-transform: inherit;
## border-right-style: solid;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## padding-left: 5px;
## padding-right: 5px;
## vertical-align: top;
## }
##
## #vdhowgsvdz .gt_row_group_first td {
## border-top-width: 2px;
## }
##
## #vdhowgsvdz .gt_row_group_first th {
## border-top-width: 2px;
## }
##
## #vdhowgsvdz .gt_summary_row {
## color: #333333;
## background-color: #FFFFFF;
## text-transform: inherit;
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #vdhowgsvdz .gt_first_summary_row {
## border-top-style: solid;
## border-top-color: #D3D3D3;
## }
##
## #vdhowgsvdz .gt_first_summary_row.thick {
## border-top-width: 2px;
## }
##
## #vdhowgsvdz .gt_last_summary_row {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## }
##
## #vdhowgsvdz .gt_grand_summary_row {
## color: #333333;
## background-color: #FFFFFF;
## text-transform: inherit;
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #vdhowgsvdz .gt_first_grand_summary_row {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## border-top-style: double;
## border-top-width: 6px;
## border-top-color: #D3D3D3;
## }
##
## #vdhowgsvdz .gt_last_grand_summary_row_top {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## border-bottom-style: double;
## border-bottom-width: 6px;
## border-bottom-color: #D3D3D3;
## }
##
## #vdhowgsvdz .gt_striped {
## background-color: rgba(128, 128, 128, 0.05);
## }
##
## #vdhowgsvdz .gt_table_body {
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## }
##
## #vdhowgsvdz .gt_footnotes {
## color: #333333;
## background-color: #FFFFFF;
## border-bottom-style: none;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 2px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## }
##
## #vdhowgsvdz .gt_footnote {
## margin: 0px;
## font-size: 90%;
## padding-top: 4px;
## padding-bottom: 4px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #vdhowgsvdz .gt_sourcenotes {
## color: #333333;
## background-color: #FFFFFF;
## border-bottom-style: none;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 2px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## }
##
## #vdhowgsvdz .gt_sourcenote {
## font-size: 90%;
## padding-top: 4px;
## padding-bottom: 4px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #vdhowgsvdz .gt_left {
## text-align: left;
## }
##
## #vdhowgsvdz .gt_center {
## text-align: center;
## }
##
## #vdhowgsvdz .gt_right {
## text-align: right;
## font-variant-numeric: tabular-nums;
## }
##
## #vdhowgsvdz .gt_font_normal {
## font-weight: normal;
## }
##
## #vdhowgsvdz .gt_font_bold {
## font-weight: bold;
## }
##
## #vdhowgsvdz .gt_font_italic {
## font-style: italic;
## }
##
## #vdhowgsvdz .gt_super {
## font-size: 65%;
## }
##
## #vdhowgsvdz .gt_footnote_marks {
## font-size: 75%;
## vertical-align: 0.4em;
## position: initial;
## }
##
## #vdhowgsvdz .gt_asterisk {
## font-size: 100%;
## vertical-align: 0;
## }
##
## #vdhowgsvdz .gt_indent_1 {
## text-indent: 5px;
## }
##
## #vdhowgsvdz .gt_indent_2 {
## text-indent: 10px;
## }
##
## #vdhowgsvdz .gt_indent_3 {
## text-indent: 15px;
## }
##
## #vdhowgsvdz .gt_indent_4 {
## text-indent: 20px;
## }
##
## #vdhowgsvdz .gt_indent_5 {
## text-indent: 25px;
## }
##
## #vdhowgsvdz .katex-display {
## display: inline-flex !important;
## margin-bottom: 0.75em !important;
## }
##
## #vdhowgsvdz div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {
## height: 0px !important;
## }
## </style>
## <table class="gt_table" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
## <thead>
## <tr class="gt_col_headings">
## <th class="gt_col_heading gt_columns_bottom_border gt_left" rowspan="1" colspan="1" scope="col" id="case_race">case_race</th>
## <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="n">n</th>
## <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="pct">pct</th>
## </tr>
## </thead>
## <tbody class="gt_table_body">
## <tr><td headers="case_race" class="gt_row gt_left">AMERICAN INDIAN/ALASKA NATIVE</td>
## <td headers="n" class="gt_row gt_right">84</td>
## <td headers="pct" class="gt_row gt_right">0.10569893</td></tr>
## <tr><td headers="case_race" class="gt_row gt_left">ASIAN</td>
## <td headers="n" class="gt_row gt_right">3075</td>
## <td headers="pct" class="gt_row gt_right">3.86933598</td></tr>
## <tr><td headers="case_race" class="gt_row gt_left">BLACK</td>
## <td headers="n" class="gt_row gt_right">35048</td>
## <td headers="pct" class="gt_row gt_right">44.10162198</td></tr>
## <tr><td headers="case_race" class="gt_row gt_left">NATIVE HAWAIIAN/PACIFIC ISLANDER</td>
## <td headers="n" class="gt_row gt_right">79</td>
## <td headers="pct" class="gt_row gt_right">0.09940733</td></tr>
## <tr><td headers="case_race" class="gt_row gt_left">OTHER</td>
## <td headers="n" class="gt_row gt_right">5863</td>
## <td headers="pct" class="gt_row gt_right">7.37753394</td></tr>
## <tr><td headers="case_race" class="gt_row gt_left">UNKNOWN</td>
## <td headers="n" class="gt_row gt_right">3723</td>
## <td headers="pct" class="gt_row gt_right">4.68472776</td></tr>
## <tr><td headers="case_race" class="gt_row gt_left">WHITE</td>
## <td headers="n" class="gt_row gt_right">31599</td>
## <td headers="pct" class="gt_row gt_right">39.76167407</td></tr>
## </tbody>
##
## </table>
## </div>
##
## $`Distribución por etnicidad`
## <div id="qhuqwqvdro" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
## <style>#qhuqwqvdro table {
## font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
## -webkit-font-smoothing: antialiased;
## -moz-osx-font-smoothing: grayscale;
## }
##
## #qhuqwqvdro thead, #qhuqwqvdro tbody, #qhuqwqvdro tfoot, #qhuqwqvdro tr, #qhuqwqvdro td, #qhuqwqvdro th {
## border-style: none;
## }
##
## #qhuqwqvdro p {
## margin: 0;
## padding: 0;
## }
##
## #qhuqwqvdro .gt_table {
## display: table;
## border-collapse: collapse;
## line-height: normal;
## margin-left: auto;
## margin-right: auto;
## color: #333333;
## font-size: 16px;
## font-weight: normal;
## font-style: normal;
## background-color: #FFFFFF;
## width: auto;
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #A8A8A8;
## border-right-style: none;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #A8A8A8;
## border-left-style: none;
## border-left-width: 2px;
## border-left-color: #D3D3D3;
## }
##
## #qhuqwqvdro .gt_caption {
## padding-top: 4px;
## padding-bottom: 4px;
## }
##
## #qhuqwqvdro .gt_title {
## color: #333333;
## font-size: 125%;
## font-weight: initial;
## padding-top: 4px;
## padding-bottom: 4px;
## padding-left: 5px;
## padding-right: 5px;
## border-bottom-color: #FFFFFF;
## border-bottom-width: 0;
## }
##
## #qhuqwqvdro .gt_subtitle {
## color: #333333;
## font-size: 85%;
## font-weight: initial;
## padding-top: 3px;
## padding-bottom: 5px;
## padding-left: 5px;
## padding-right: 5px;
## border-top-color: #FFFFFF;
## border-top-width: 0;
## }
##
## #qhuqwqvdro .gt_heading {
## background-color: #FFFFFF;
## text-align: center;
## border-bottom-color: #FFFFFF;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## }
##
## #qhuqwqvdro .gt_bottom_border {
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## }
##
## #qhuqwqvdro .gt_col_headings {
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## }
##
## #qhuqwqvdro .gt_col_heading {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: normal;
## text-transform: inherit;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## vertical-align: bottom;
## padding-top: 5px;
## padding-bottom: 6px;
## padding-left: 5px;
## padding-right: 5px;
## overflow-x: hidden;
## }
##
## #qhuqwqvdro .gt_column_spanner_outer {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: normal;
## text-transform: inherit;
## padding-top: 0;
## padding-bottom: 0;
## padding-left: 4px;
## padding-right: 4px;
## }
##
## #qhuqwqvdro .gt_column_spanner_outer:first-child {
## padding-left: 0;
## }
##
## #qhuqwqvdro .gt_column_spanner_outer:last-child {
## padding-right: 0;
## }
##
## #qhuqwqvdro .gt_column_spanner {
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## vertical-align: bottom;
## padding-top: 5px;
## padding-bottom: 5px;
## overflow-x: hidden;
## display: inline-block;
## width: 100%;
## }
##
## #qhuqwqvdro .gt_spanner_row {
## border-bottom-style: hidden;
## }
##
## #qhuqwqvdro .gt_group_heading {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## text-transform: inherit;
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## vertical-align: middle;
## text-align: left;
## }
##
## #qhuqwqvdro .gt_empty_group_heading {
## padding: 0.5px;
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## vertical-align: middle;
## }
##
## #qhuqwqvdro .gt_from_md > :first-child {
## margin-top: 0;
## }
##
## #qhuqwqvdro .gt_from_md > :last-child {
## margin-bottom: 0;
## }
##
## #qhuqwqvdro .gt_row {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## margin: 10px;
## border-top-style: solid;
## border-top-width: 1px;
## border-top-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## vertical-align: middle;
## overflow-x: hidden;
## }
##
## #qhuqwqvdro .gt_stub {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## text-transform: inherit;
## border-right-style: solid;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #qhuqwqvdro .gt_stub_row_group {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## text-transform: inherit;
## border-right-style: solid;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## padding-left: 5px;
## padding-right: 5px;
## vertical-align: top;
## }
##
## #qhuqwqvdro .gt_row_group_first td {
## border-top-width: 2px;
## }
##
## #qhuqwqvdro .gt_row_group_first th {
## border-top-width: 2px;
## }
##
## #qhuqwqvdro .gt_summary_row {
## color: #333333;
## background-color: #FFFFFF;
## text-transform: inherit;
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #qhuqwqvdro .gt_first_summary_row {
## border-top-style: solid;
## border-top-color: #D3D3D3;
## }
##
## #qhuqwqvdro .gt_first_summary_row.thick {
## border-top-width: 2px;
## }
##
## #qhuqwqvdro .gt_last_summary_row {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## }
##
## #qhuqwqvdro .gt_grand_summary_row {
## color: #333333;
## background-color: #FFFFFF;
## text-transform: inherit;
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #qhuqwqvdro .gt_first_grand_summary_row {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## border-top-style: double;
## border-top-width: 6px;
## border-top-color: #D3D3D3;
## }
##
## #qhuqwqvdro .gt_last_grand_summary_row_top {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## border-bottom-style: double;
## border-bottom-width: 6px;
## border-bottom-color: #D3D3D3;
## }
##
## #qhuqwqvdro .gt_striped {
## background-color: rgba(128, 128, 128, 0.05);
## }
##
## #qhuqwqvdro .gt_table_body {
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## }
##
## #qhuqwqvdro .gt_footnotes {
## color: #333333;
## background-color: #FFFFFF;
## border-bottom-style: none;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 2px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## }
##
## #qhuqwqvdro .gt_footnote {
## margin: 0px;
## font-size: 90%;
## padding-top: 4px;
## padding-bottom: 4px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #qhuqwqvdro .gt_sourcenotes {
## color: #333333;
## background-color: #FFFFFF;
## border-bottom-style: none;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 2px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## }
##
## #qhuqwqvdro .gt_sourcenote {
## font-size: 90%;
## padding-top: 4px;
## padding-bottom: 4px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #qhuqwqvdro .gt_left {
## text-align: left;
## }
##
## #qhuqwqvdro .gt_center {
## text-align: center;
## }
##
## #qhuqwqvdro .gt_right {
## text-align: right;
## font-variant-numeric: tabular-nums;
## }
##
## #qhuqwqvdro .gt_font_normal {
## font-weight: normal;
## }
##
## #qhuqwqvdro .gt_font_bold {
## font-weight: bold;
## }
##
## #qhuqwqvdro .gt_font_italic {
## font-style: italic;
## }
##
## #qhuqwqvdro .gt_super {
## font-size: 65%;
## }
##
## #qhuqwqvdro .gt_footnote_marks {
## font-size: 75%;
## vertical-align: 0.4em;
## position: initial;
## }
##
## #qhuqwqvdro .gt_asterisk {
## font-size: 100%;
## vertical-align: 0;
## }
##
## #qhuqwqvdro .gt_indent_1 {
## text-indent: 5px;
## }
##
## #qhuqwqvdro .gt_indent_2 {
## text-indent: 10px;
## }
##
## #qhuqwqvdro .gt_indent_3 {
## text-indent: 15px;
## }
##
## #qhuqwqvdro .gt_indent_4 {
## text-indent: 20px;
## }
##
## #qhuqwqvdro .gt_indent_5 {
## text-indent: 25px;
## }
##
## #qhuqwqvdro .katex-display {
## display: inline-flex !important;
## margin-bottom: 0.75em !important;
## }
##
## #qhuqwqvdro div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {
## height: 0px !important;
## }
## </style>
## <table class="gt_table" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
## <thead>
## <tr class="gt_col_headings">
## <th class="gt_col_heading gt_columns_bottom_border gt_left" rowspan="1" colspan="1" scope="col" id="case_eth">case_eth</th>
## <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="n">n</th>
## <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="pct">pct</th>
## </tr>
## </thead>
## <tbody class="gt_table_body">
## <tr><td headers="case_eth" class="gt_row gt_left">HISPANIC/LATINO</td>
## <td headers="n" class="gt_row gt_right">8625</td>
## <td headers="pct" class="gt_row gt_right">10.84537</td></tr>
## <tr><td headers="case_eth" class="gt_row gt_left">NON-HISPANIC/LATINO</td>
## <td headers="n" class="gt_row gt_right">62677</td>
## <td headers="pct" class="gt_row gt_right">78.81223</td></tr>
## <tr><td headers="case_eth" class="gt_row gt_left">NOT SPECIFIED</td>
## <td headers="n" class="gt_row gt_right">8225</td>
## <td headers="pct" class="gt_row gt_right">10.34240</td></tr>
## </tbody>
##
## </table>
## </div>
##
## $`Cruzada edad x género`
## <div id="hotszlyaci" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
## <style>#hotszlyaci table {
## font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
## -webkit-font-smoothing: antialiased;
## -moz-osx-font-smoothing: grayscale;
## }
##
## #hotszlyaci thead, #hotszlyaci tbody, #hotszlyaci tfoot, #hotszlyaci tr, #hotszlyaci td, #hotszlyaci th {
## border-style: none;
## }
##
## #hotszlyaci p {
## margin: 0;
## padding: 0;
## }
##
## #hotszlyaci .gt_table {
## display: table;
## border-collapse: collapse;
## line-height: normal;
## margin-left: auto;
## margin-right: auto;
## color: #333333;
## font-size: 16px;
## font-weight: normal;
## font-style: normal;
## background-color: #FFFFFF;
## width: auto;
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #A8A8A8;
## border-right-style: none;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #A8A8A8;
## border-left-style: none;
## border-left-width: 2px;
## border-left-color: #D3D3D3;
## }
##
## #hotszlyaci .gt_caption {
## padding-top: 4px;
## padding-bottom: 4px;
## }
##
## #hotszlyaci .gt_title {
## color: #333333;
## font-size: 125%;
## font-weight: initial;
## padding-top: 4px;
## padding-bottom: 4px;
## padding-left: 5px;
## padding-right: 5px;
## border-bottom-color: #FFFFFF;
## border-bottom-width: 0;
## }
##
## #hotszlyaci .gt_subtitle {
## color: #333333;
## font-size: 85%;
## font-weight: initial;
## padding-top: 3px;
## padding-bottom: 5px;
## padding-left: 5px;
## padding-right: 5px;
## border-top-color: #FFFFFF;
## border-top-width: 0;
## }
##
## #hotszlyaci .gt_heading {
## background-color: #FFFFFF;
## text-align: center;
## border-bottom-color: #FFFFFF;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## }
##
## #hotszlyaci .gt_bottom_border {
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## }
##
## #hotszlyaci .gt_col_headings {
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## }
##
## #hotszlyaci .gt_col_heading {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: normal;
## text-transform: inherit;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## vertical-align: bottom;
## padding-top: 5px;
## padding-bottom: 6px;
## padding-left: 5px;
## padding-right: 5px;
## overflow-x: hidden;
## }
##
## #hotszlyaci .gt_column_spanner_outer {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: normal;
## text-transform: inherit;
## padding-top: 0;
## padding-bottom: 0;
## padding-left: 4px;
## padding-right: 4px;
## }
##
## #hotszlyaci .gt_column_spanner_outer:first-child {
## padding-left: 0;
## }
##
## #hotszlyaci .gt_column_spanner_outer:last-child {
## padding-right: 0;
## }
##
## #hotszlyaci .gt_column_spanner {
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## vertical-align: bottom;
## padding-top: 5px;
## padding-bottom: 5px;
## overflow-x: hidden;
## display: inline-block;
## width: 100%;
## }
##
## #hotszlyaci .gt_spanner_row {
## border-bottom-style: hidden;
## }
##
## #hotszlyaci .gt_group_heading {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## text-transform: inherit;
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## vertical-align: middle;
## text-align: left;
## }
##
## #hotszlyaci .gt_empty_group_heading {
## padding: 0.5px;
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## vertical-align: middle;
## }
##
## #hotszlyaci .gt_from_md > :first-child {
## margin-top: 0;
## }
##
## #hotszlyaci .gt_from_md > :last-child {
## margin-bottom: 0;
## }
##
## #hotszlyaci .gt_row {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## margin: 10px;
## border-top-style: solid;
## border-top-width: 1px;
## border-top-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## vertical-align: middle;
## overflow-x: hidden;
## }
##
## #hotszlyaci .gt_stub {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## text-transform: inherit;
## border-right-style: solid;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #hotszlyaci .gt_stub_row_group {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## text-transform: inherit;
## border-right-style: solid;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## padding-left: 5px;
## padding-right: 5px;
## vertical-align: top;
## }
##
## #hotszlyaci .gt_row_group_first td {
## border-top-width: 2px;
## }
##
## #hotszlyaci .gt_row_group_first th {
## border-top-width: 2px;
## }
##
## #hotszlyaci .gt_summary_row {
## color: #333333;
## background-color: #FFFFFF;
## text-transform: inherit;
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #hotszlyaci .gt_first_summary_row {
## border-top-style: solid;
## border-top-color: #D3D3D3;
## }
##
## #hotszlyaci .gt_first_summary_row.thick {
## border-top-width: 2px;
## }
##
## #hotszlyaci .gt_last_summary_row {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## }
##
## #hotszlyaci .gt_grand_summary_row {
## color: #333333;
## background-color: #FFFFFF;
## text-transform: inherit;
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #hotszlyaci .gt_first_grand_summary_row {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## border-top-style: double;
## border-top-width: 6px;
## border-top-color: #D3D3D3;
## }
##
## #hotszlyaci .gt_last_grand_summary_row_top {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## border-bottom-style: double;
## border-bottom-width: 6px;
## border-bottom-color: #D3D3D3;
## }
##
## #hotszlyaci .gt_striped {
## background-color: rgba(128, 128, 128, 0.05);
## }
##
## #hotszlyaci .gt_table_body {
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## }
##
## #hotszlyaci .gt_footnotes {
## color: #333333;
## background-color: #FFFFFF;
## border-bottom-style: none;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 2px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## }
##
## #hotszlyaci .gt_footnote {
## margin: 0px;
## font-size: 90%;
## padding-top: 4px;
## padding-bottom: 4px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #hotszlyaci .gt_sourcenotes {
## color: #333333;
## background-color: #FFFFFF;
## border-bottom-style: none;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 2px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## }
##
## #hotszlyaci .gt_sourcenote {
## font-size: 90%;
## padding-top: 4px;
## padding-bottom: 4px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #hotszlyaci .gt_left {
## text-align: left;
## }
##
## #hotszlyaci .gt_center {
## text-align: center;
## }
##
## #hotszlyaci .gt_right {
## text-align: right;
## font-variant-numeric: tabular-nums;
## }
##
## #hotszlyaci .gt_font_normal {
## font-weight: normal;
## }
##
## #hotszlyaci .gt_font_bold {
## font-weight: bold;
## }
##
## #hotszlyaci .gt_font_italic {
## font-style: italic;
## }
##
## #hotszlyaci .gt_super {
## font-size: 65%;
## }
##
## #hotszlyaci .gt_footnote_marks {
## font-size: 75%;
## vertical-align: 0.4em;
## position: initial;
## }
##
## #hotszlyaci .gt_asterisk {
## font-size: 100%;
## vertical-align: 0;
## }
##
## #hotszlyaci .gt_indent_1 {
## text-indent: 5px;
## }
##
## #hotszlyaci .gt_indent_2 {
## text-indent: 10px;
## }
##
## #hotszlyaci .gt_indent_3 {
## text-indent: 15px;
## }
##
## #hotszlyaci .gt_indent_4 {
## text-indent: 20px;
## }
##
## #hotszlyaci .gt_indent_5 {
## text-indent: 25px;
## }
##
## #hotszlyaci .katex-display {
## display: inline-flex !important;
## margin-bottom: 0.75em !important;
## }
##
## #hotszlyaci div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {
## height: 0px !important;
## }
## </style>
## <table class="gt_table" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
## <thead>
## <tr class="gt_col_headings">
## <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="age_group">age_group</th>
## <th class="gt_col_heading gt_columns_bottom_border gt_left" rowspan="1" colspan="1" scope="col" id="case_gender">case_gender</th>
## <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="n">n</th>
## <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="pct">pct</th>
## </tr>
## </thead>
## <tbody class="gt_table_body">
## <tr><td headers="age_group" class="gt_row gt_right">0-17</td>
## <td headers="case_gender" class="gt_row gt_left">Female</td>
## <td headers="n" class="gt_row gt_right">4015</td>
## <td headers="pct" class="gt_row gt_right">50.1812273</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">0-17</td>
## <td headers="case_gender" class="gt_row gt_left">Male</td>
## <td headers="n" class="gt_row gt_right">3948</td>
## <td headers="pct" class="gt_row gt_right">49.3438320</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">0-17</td>
## <td headers="case_gender" class="gt_row gt_left">Unknown</td>
## <td headers="n" class="gt_row gt_right">38</td>
## <td headers="pct" class="gt_row gt_right">0.4749406</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">18-29</td>
## <td headers="case_gender" class="gt_row gt_left">Female</td>
## <td headers="n" class="gt_row gt_right">11227</td>
## <td headers="pct" class="gt_row gt_right">54.3838403</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">18-29</td>
## <td headers="case_gender" class="gt_row gt_left">Male</td>
## <td headers="n" class="gt_row gt_right">9333</td>
## <td headers="pct" class="gt_row gt_right">45.2092618</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">18-29</td>
## <td headers="case_gender" class="gt_row gt_left">Unknown</td>
## <td headers="n" class="gt_row gt_right">84</td>
## <td headers="pct" class="gt_row gt_right">0.4068979</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">30-44</td>
## <td headers="case_gender" class="gt_row gt_left">Female</td>
## <td headers="n" class="gt_row gt_right">11935</td>
## <td headers="pct" class="gt_row gt_right">52.6466696</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">30-44</td>
## <td headers="case_gender" class="gt_row gt_left">Male</td>
## <td headers="n" class="gt_row gt_right">10639</td>
## <td headers="pct" class="gt_row gt_right">46.9298633</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">30-44</td>
## <td headers="case_gender" class="gt_row gt_left">Unknown</td>
## <td headers="n" class="gt_row gt_right">96</td>
## <td headers="pct" class="gt_row gt_right">0.4234671</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">45-64</td>
## <td headers="case_gender" class="gt_row gt_left">Female</td>
## <td headers="n" class="gt_row gt_right">10969</td>
## <td headers="pct" class="gt_row gt_right">51.0661080</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">45-64</td>
## <td headers="case_gender" class="gt_row gt_left">Male</td>
## <td headers="n" class="gt_row gt_right">10432</td>
## <td headers="pct" class="gt_row gt_right">48.5661080</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">45-64</td>
## <td headers="case_gender" class="gt_row gt_left">Unknown</td>
## <td headers="n" class="gt_row gt_right">79</td>
## <td headers="pct" class="gt_row gt_right">0.3677840</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">65+</td>
## <td headers="case_gender" class="gt_row gt_left">Female</td>
## <td headers="n" class="gt_row gt_right">5132</td>
## <td headers="pct" class="gt_row gt_right">55.8068726</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">65+</td>
## <td headers="case_gender" class="gt_row gt_left">Male</td>
## <td headers="n" class="gt_row gt_right">4026</td>
## <td headers="pct" class="gt_row gt_right">43.7799043</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">65+</td>
## <td headers="case_gender" class="gt_row gt_left">Unknown</td>
## <td headers="n" class="gt_row gt_right">38</td>
## <td headers="pct" class="gt_row gt_right">0.4132231</td></tr>
## </tbody>
##
## </table>
## </div>
##3.2 Síntomas
# Detectar columnas de síntomas (prefijos comunes: sym_ o symptom)
sym_cols <- names(df)[str_detect(names(df), "^sym_|^symptom|^sym_")]
# Si no encuentra, intenta detectar columnas con palabras clave
if (length(sym_cols) == 0) {
sym_cols <- names(df)[str_detect(names(df), "fever|cough|headache|anosmia|loss_of_smell|sore_throat|fatigue|myalgia", ignore_case = TRUE)]
}
# Calcular proporción de "Yes" para cada síntoma (solo casos con dato disponible)
sym_summary <- tibble(symptom = sym_cols) %>%
mutate(
yes = map_int(symptom, ~ sum(df[[.x]] %in% c("Yes", "yes", "YES", "Y", 1), na.rm = TRUE)),
available = map_int(symptom, ~ sum(!is.na(df[[.x]]))),
pct_yes = round(yes / pmax(available,1) * 100, 2)
) %>%
arrange(desc(pct_yes))
sym_summary %>% head(10) %>% gt::gt() %>% tab_header(title = "Síntomas más frecuentes (top 10)")
| Síntomas más frecuentes (top 10) | |||
| symptom | yes | available | pct_yes |
|---|---|---|---|
| sym_cough | 21943 | 50471 | 43.48 |
| sym_headache | 21675 | 50083 | 43.28 |
| sym_losstastesmell | 12734 | 31377 | 40.58 |
| sym_myalgia | 19534 | 49964 | 39.10 |
| sym_fever | 15127 | 50524 | 29.94 |
| sym_subjfever | 12712 | 44193 | 28.76 |
| sym_sorethroat | 12516 | 49860 | 25.10 |
| sym_startdt_false | 0 | 44621 | 0.00 |
| sym_resolved | 0 | 39807 | 0.00 |
| sym_resolveddt_false | 0 | 16302 | 0.00 |
Los síntomas más comunes fueron tos (43.5%), dolor de cabeza (43.3%), y pérdida del gusto u olfato (40.6%). También destacaron el dolor muscular (39.1%), la fiebre (29.9%), la fiebre subjetiva (28.8%) y el dolor de garganta (25.1%). Estos resultados indican que los síntomas respiratorios y neurosensoriales fueron los más reportados en la mayoría de los casos.
# Detectar columnas comunes
hosp_col <- names(df)[str_detect(names(df), "hospitalized|hospitalisation|hospitalized_flag|is_hospitalized")]
died_col <- names(df)[str_detect(names(df), "^died$|death|deceased|died_flag")]
confirmed_col <- names(df)[str_detect(names(df), "confirmed_case|confirmed|is_confirmed")]
hosp_col <- ifelse(length(hosp_col)>0, hosp_col[1], NA)
died_col <- ifelse(length(died_col)>0, died_col[1], NA)
confirmed_col <- ifelse(length(confirmed_col)>0, confirmed_col[1], NA)
# Tasa de hospitalización sobre casos con valor conocido (Yes/No)
hosp_summary <- df %>%
filter(!is.na(.data[[hosp_col]])) %>%
mutate(hosp_yes = .data[[hosp_col]] %in% c("Yes","YES","yes","Y",1)) %>%
summarise(n_known = n(), n_hosp = sum(hosp_yes, na.rm=TRUE), pct_hosp = n_hosp/n_known*100)
hosp_summary
## # A tibble: 1 × 3
## n_known n_hosp pct_hosp
## <int> <int> <dbl>
## 1 49619 5297 10.7
# CFR: % de died == 'Yes' entre confirmed_case == 'Yes' y con valor died conocido
cfr_summary <- df %>%
filter(!is.na(.data[[died_col]]) & !is.na(.data[[confirmed_col]])) %>%
filter(.data[[confirmed_col]] %in% c("Yes","YES","yes","Y",1)) %>%
mutate(died_yes = .data[[died_col]] %in% c("Yes","YES","yes","Y",1)) %>%
summarise(n_confirmed = n(), n_died = sum(died_yes, na.rm=TRUE), cfr = n_died/n_confirmed*100)
cfr_summary
## # A tibble: 1 × 3
## n_confirmed n_died cfr
## <int> <int> <dbl>
## 1 45243 1702 3.76
# Presentar resultados por age_group
hosp_by_age <- df %>%
filter(!is.na(age_group) & !is.na(.data[[hosp_col]])) %>%
mutate(hosp_yes = .data[[hosp_col]] %in% c("Yes","YES","yes","Y",1)) %>%
group_by(age_group) %>%
summarise(n_known = n(), n_hosp = sum(hosp_yes, na.rm=TRUE), pct_hosp = n_hosp/n_known*100) %>%
arrange(age_group)
cfr_by_age <- df %>%
filter(!is.na(age_group) & !is.na(.data[[died_col]]) & !is.na(.data[[confirmed_col]])) %>%
filter(.data[[confirmed_col]] %in% c("Yes","YES","yes","Y",1)) %>%
mutate(died_yes = .data[[died_col]] %in% c("Yes","YES","yes","Y",1)) %>%
group_by(age_group) %>%
summarise(n_confirmed = n(), n_died = sum(died_yes, na.rm=TRUE), cfr = n_died/n_confirmed*100) %>%
arrange(age_group)
list(
"Hospitalización por grupo etario" = gt::gt(hosp_by_age),
"CFR por grupo etario" = gt::gt(cfr_by_age)
)
## $`Hospitalización por grupo etario`
## <div id="lgzylkrhpg" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
## <style>#lgzylkrhpg table {
## font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
## -webkit-font-smoothing: antialiased;
## -moz-osx-font-smoothing: grayscale;
## }
##
## #lgzylkrhpg thead, #lgzylkrhpg tbody, #lgzylkrhpg tfoot, #lgzylkrhpg tr, #lgzylkrhpg td, #lgzylkrhpg th {
## border-style: none;
## }
##
## #lgzylkrhpg p {
## margin: 0;
## padding: 0;
## }
##
## #lgzylkrhpg .gt_table {
## display: table;
## border-collapse: collapse;
## line-height: normal;
## margin-left: auto;
## margin-right: auto;
## color: #333333;
## font-size: 16px;
## font-weight: normal;
## font-style: normal;
## background-color: #FFFFFF;
## width: auto;
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #A8A8A8;
## border-right-style: none;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #A8A8A8;
## border-left-style: none;
## border-left-width: 2px;
## border-left-color: #D3D3D3;
## }
##
## #lgzylkrhpg .gt_caption {
## padding-top: 4px;
## padding-bottom: 4px;
## }
##
## #lgzylkrhpg .gt_title {
## color: #333333;
## font-size: 125%;
## font-weight: initial;
## padding-top: 4px;
## padding-bottom: 4px;
## padding-left: 5px;
## padding-right: 5px;
## border-bottom-color: #FFFFFF;
## border-bottom-width: 0;
## }
##
## #lgzylkrhpg .gt_subtitle {
## color: #333333;
## font-size: 85%;
## font-weight: initial;
## padding-top: 3px;
## padding-bottom: 5px;
## padding-left: 5px;
## padding-right: 5px;
## border-top-color: #FFFFFF;
## border-top-width: 0;
## }
##
## #lgzylkrhpg .gt_heading {
## background-color: #FFFFFF;
## text-align: center;
## border-bottom-color: #FFFFFF;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## }
##
## #lgzylkrhpg .gt_bottom_border {
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## }
##
## #lgzylkrhpg .gt_col_headings {
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## }
##
## #lgzylkrhpg .gt_col_heading {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: normal;
## text-transform: inherit;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## vertical-align: bottom;
## padding-top: 5px;
## padding-bottom: 6px;
## padding-left: 5px;
## padding-right: 5px;
## overflow-x: hidden;
## }
##
## #lgzylkrhpg .gt_column_spanner_outer {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: normal;
## text-transform: inherit;
## padding-top: 0;
## padding-bottom: 0;
## padding-left: 4px;
## padding-right: 4px;
## }
##
## #lgzylkrhpg .gt_column_spanner_outer:first-child {
## padding-left: 0;
## }
##
## #lgzylkrhpg .gt_column_spanner_outer:last-child {
## padding-right: 0;
## }
##
## #lgzylkrhpg .gt_column_spanner {
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## vertical-align: bottom;
## padding-top: 5px;
## padding-bottom: 5px;
## overflow-x: hidden;
## display: inline-block;
## width: 100%;
## }
##
## #lgzylkrhpg .gt_spanner_row {
## border-bottom-style: hidden;
## }
##
## #lgzylkrhpg .gt_group_heading {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## text-transform: inherit;
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## vertical-align: middle;
## text-align: left;
## }
##
## #lgzylkrhpg .gt_empty_group_heading {
## padding: 0.5px;
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## vertical-align: middle;
## }
##
## #lgzylkrhpg .gt_from_md > :first-child {
## margin-top: 0;
## }
##
## #lgzylkrhpg .gt_from_md > :last-child {
## margin-bottom: 0;
## }
##
## #lgzylkrhpg .gt_row {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## margin: 10px;
## border-top-style: solid;
## border-top-width: 1px;
## border-top-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## vertical-align: middle;
## overflow-x: hidden;
## }
##
## #lgzylkrhpg .gt_stub {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## text-transform: inherit;
## border-right-style: solid;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #lgzylkrhpg .gt_stub_row_group {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## text-transform: inherit;
## border-right-style: solid;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## padding-left: 5px;
## padding-right: 5px;
## vertical-align: top;
## }
##
## #lgzylkrhpg .gt_row_group_first td {
## border-top-width: 2px;
## }
##
## #lgzylkrhpg .gt_row_group_first th {
## border-top-width: 2px;
## }
##
## #lgzylkrhpg .gt_summary_row {
## color: #333333;
## background-color: #FFFFFF;
## text-transform: inherit;
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #lgzylkrhpg .gt_first_summary_row {
## border-top-style: solid;
## border-top-color: #D3D3D3;
## }
##
## #lgzylkrhpg .gt_first_summary_row.thick {
## border-top-width: 2px;
## }
##
## #lgzylkrhpg .gt_last_summary_row {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## }
##
## #lgzylkrhpg .gt_grand_summary_row {
## color: #333333;
## background-color: #FFFFFF;
## text-transform: inherit;
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #lgzylkrhpg .gt_first_grand_summary_row {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## border-top-style: double;
## border-top-width: 6px;
## border-top-color: #D3D3D3;
## }
##
## #lgzylkrhpg .gt_last_grand_summary_row_top {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## border-bottom-style: double;
## border-bottom-width: 6px;
## border-bottom-color: #D3D3D3;
## }
##
## #lgzylkrhpg .gt_striped {
## background-color: rgba(128, 128, 128, 0.05);
## }
##
## #lgzylkrhpg .gt_table_body {
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## }
##
## #lgzylkrhpg .gt_footnotes {
## color: #333333;
## background-color: #FFFFFF;
## border-bottom-style: none;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 2px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## }
##
## #lgzylkrhpg .gt_footnote {
## margin: 0px;
## font-size: 90%;
## padding-top: 4px;
## padding-bottom: 4px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #lgzylkrhpg .gt_sourcenotes {
## color: #333333;
## background-color: #FFFFFF;
## border-bottom-style: none;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 2px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## }
##
## #lgzylkrhpg .gt_sourcenote {
## font-size: 90%;
## padding-top: 4px;
## padding-bottom: 4px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #lgzylkrhpg .gt_left {
## text-align: left;
## }
##
## #lgzylkrhpg .gt_center {
## text-align: center;
## }
##
## #lgzylkrhpg .gt_right {
## text-align: right;
## font-variant-numeric: tabular-nums;
## }
##
## #lgzylkrhpg .gt_font_normal {
## font-weight: normal;
## }
##
## #lgzylkrhpg .gt_font_bold {
## font-weight: bold;
## }
##
## #lgzylkrhpg .gt_font_italic {
## font-style: italic;
## }
##
## #lgzylkrhpg .gt_super {
## font-size: 65%;
## }
##
## #lgzylkrhpg .gt_footnote_marks {
## font-size: 75%;
## vertical-align: 0.4em;
## position: initial;
## }
##
## #lgzylkrhpg .gt_asterisk {
## font-size: 100%;
## vertical-align: 0;
## }
##
## #lgzylkrhpg .gt_indent_1 {
## text-indent: 5px;
## }
##
## #lgzylkrhpg .gt_indent_2 {
## text-indent: 10px;
## }
##
## #lgzylkrhpg .gt_indent_3 {
## text-indent: 15px;
## }
##
## #lgzylkrhpg .gt_indent_4 {
## text-indent: 20px;
## }
##
## #lgzylkrhpg .gt_indent_5 {
## text-indent: 25px;
## }
##
## #lgzylkrhpg .katex-display {
## display: inline-flex !important;
## margin-bottom: 0.75em !important;
## }
##
## #lgzylkrhpg div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {
## height: 0px !important;
## }
## </style>
## <table class="gt_table" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
## <thead>
## <tr class="gt_col_headings">
## <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="age_group">age_group</th>
## <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="n_known">n_known</th>
## <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="n_hosp">n_hosp</th>
## <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="pct_hosp">pct_hosp</th>
## </tr>
## </thead>
## <tbody class="gt_table_body">
## <tr><td headers="age_group" class="gt_row gt_right">0-17</td>
## <td headers="n_known" class="gt_row gt_right">5446</td>
## <td headers="n_hosp" class="gt_row gt_right">106</td>
## <td headers="pct_hosp" class="gt_row gt_right">1.946383</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">18-29</td>
## <td headers="n_known" class="gt_row gt_right">11843</td>
## <td headers="n_hosp" class="gt_row gt_right">365</td>
## <td headers="pct_hosp" class="gt_row gt_right">3.081989</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">30-44</td>
## <td headers="n_known" class="gt_row gt_right">13666</td>
## <td headers="n_hosp" class="gt_row gt_right">861</td>
## <td headers="pct_hosp" class="gt_row gt_right">6.300307</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">45-64</td>
## <td headers="n_known" class="gt_row gt_right">12949</td>
## <td headers="n_hosp" class="gt_row gt_right">1769</td>
## <td headers="pct_hosp" class="gt_row gt_right">13.661287</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">65+</td>
## <td headers="n_known" class="gt_row gt_right">5703</td>
## <td headers="n_hosp" class="gt_row gt_right">2194</td>
## <td headers="pct_hosp" class="gt_row gt_right">38.470980</td></tr>
## </tbody>
##
## </table>
## </div>
##
## $`CFR por grupo etario`
## <div id="eoduhsgxex" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
## <style>#eoduhsgxex table {
## font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
## -webkit-font-smoothing: antialiased;
## -moz-osx-font-smoothing: grayscale;
## }
##
## #eoduhsgxex thead, #eoduhsgxex tbody, #eoduhsgxex tfoot, #eoduhsgxex tr, #eoduhsgxex td, #eoduhsgxex th {
## border-style: none;
## }
##
## #eoduhsgxex p {
## margin: 0;
## padding: 0;
## }
##
## #eoduhsgxex .gt_table {
## display: table;
## border-collapse: collapse;
## line-height: normal;
## margin-left: auto;
## margin-right: auto;
## color: #333333;
## font-size: 16px;
## font-weight: normal;
## font-style: normal;
## background-color: #FFFFFF;
## width: auto;
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #A8A8A8;
## border-right-style: none;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #A8A8A8;
## border-left-style: none;
## border-left-width: 2px;
## border-left-color: #D3D3D3;
## }
##
## #eoduhsgxex .gt_caption {
## padding-top: 4px;
## padding-bottom: 4px;
## }
##
## #eoduhsgxex .gt_title {
## color: #333333;
## font-size: 125%;
## font-weight: initial;
## padding-top: 4px;
## padding-bottom: 4px;
## padding-left: 5px;
## padding-right: 5px;
## border-bottom-color: #FFFFFF;
## border-bottom-width: 0;
## }
##
## #eoduhsgxex .gt_subtitle {
## color: #333333;
## font-size: 85%;
## font-weight: initial;
## padding-top: 3px;
## padding-bottom: 5px;
## padding-left: 5px;
## padding-right: 5px;
## border-top-color: #FFFFFF;
## border-top-width: 0;
## }
##
## #eoduhsgxex .gt_heading {
## background-color: #FFFFFF;
## text-align: center;
## border-bottom-color: #FFFFFF;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## }
##
## #eoduhsgxex .gt_bottom_border {
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## }
##
## #eoduhsgxex .gt_col_headings {
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## }
##
## #eoduhsgxex .gt_col_heading {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: normal;
## text-transform: inherit;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## vertical-align: bottom;
## padding-top: 5px;
## padding-bottom: 6px;
## padding-left: 5px;
## padding-right: 5px;
## overflow-x: hidden;
## }
##
## #eoduhsgxex .gt_column_spanner_outer {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: normal;
## text-transform: inherit;
## padding-top: 0;
## padding-bottom: 0;
## padding-left: 4px;
## padding-right: 4px;
## }
##
## #eoduhsgxex .gt_column_spanner_outer:first-child {
## padding-left: 0;
## }
##
## #eoduhsgxex .gt_column_spanner_outer:last-child {
## padding-right: 0;
## }
##
## #eoduhsgxex .gt_column_spanner {
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## vertical-align: bottom;
## padding-top: 5px;
## padding-bottom: 5px;
## overflow-x: hidden;
## display: inline-block;
## width: 100%;
## }
##
## #eoduhsgxex .gt_spanner_row {
## border-bottom-style: hidden;
## }
##
## #eoduhsgxex .gt_group_heading {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## text-transform: inherit;
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## vertical-align: middle;
## text-align: left;
## }
##
## #eoduhsgxex .gt_empty_group_heading {
## padding: 0.5px;
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## vertical-align: middle;
## }
##
## #eoduhsgxex .gt_from_md > :first-child {
## margin-top: 0;
## }
##
## #eoduhsgxex .gt_from_md > :last-child {
## margin-bottom: 0;
## }
##
## #eoduhsgxex .gt_row {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## margin: 10px;
## border-top-style: solid;
## border-top-width: 1px;
## border-top-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 1px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 1px;
## border-right-color: #D3D3D3;
## vertical-align: middle;
## overflow-x: hidden;
## }
##
## #eoduhsgxex .gt_stub {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## text-transform: inherit;
## border-right-style: solid;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #eoduhsgxex .gt_stub_row_group {
## color: #333333;
## background-color: #FFFFFF;
## font-size: 100%;
## font-weight: initial;
## text-transform: inherit;
## border-right-style: solid;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## padding-left: 5px;
## padding-right: 5px;
## vertical-align: top;
## }
##
## #eoduhsgxex .gt_row_group_first td {
## border-top-width: 2px;
## }
##
## #eoduhsgxex .gt_row_group_first th {
## border-top-width: 2px;
## }
##
## #eoduhsgxex .gt_summary_row {
## color: #333333;
## background-color: #FFFFFF;
## text-transform: inherit;
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #eoduhsgxex .gt_first_summary_row {
## border-top-style: solid;
## border-top-color: #D3D3D3;
## }
##
## #eoduhsgxex .gt_first_summary_row.thick {
## border-top-width: 2px;
## }
##
## #eoduhsgxex .gt_last_summary_row {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## }
##
## #eoduhsgxex .gt_grand_summary_row {
## color: #333333;
## background-color: #FFFFFF;
## text-transform: inherit;
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #eoduhsgxex .gt_first_grand_summary_row {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## border-top-style: double;
## border-top-width: 6px;
## border-top-color: #D3D3D3;
## }
##
## #eoduhsgxex .gt_last_grand_summary_row_top {
## padding-top: 8px;
## padding-bottom: 8px;
## padding-left: 5px;
## padding-right: 5px;
## border-bottom-style: double;
## border-bottom-width: 6px;
## border-bottom-color: #D3D3D3;
## }
##
## #eoduhsgxex .gt_striped {
## background-color: rgba(128, 128, 128, 0.05);
## }
##
## #eoduhsgxex .gt_table_body {
## border-top-style: solid;
## border-top-width: 2px;
## border-top-color: #D3D3D3;
## border-bottom-style: solid;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## }
##
## #eoduhsgxex .gt_footnotes {
## color: #333333;
## background-color: #FFFFFF;
## border-bottom-style: none;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 2px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## }
##
## #eoduhsgxex .gt_footnote {
## margin: 0px;
## font-size: 90%;
## padding-top: 4px;
## padding-bottom: 4px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #eoduhsgxex .gt_sourcenotes {
## color: #333333;
## background-color: #FFFFFF;
## border-bottom-style: none;
## border-bottom-width: 2px;
## border-bottom-color: #D3D3D3;
## border-left-style: none;
## border-left-width: 2px;
## border-left-color: #D3D3D3;
## border-right-style: none;
## border-right-width: 2px;
## border-right-color: #D3D3D3;
## }
##
## #eoduhsgxex .gt_sourcenote {
## font-size: 90%;
## padding-top: 4px;
## padding-bottom: 4px;
## padding-left: 5px;
## padding-right: 5px;
## }
##
## #eoduhsgxex .gt_left {
## text-align: left;
## }
##
## #eoduhsgxex .gt_center {
## text-align: center;
## }
##
## #eoduhsgxex .gt_right {
## text-align: right;
## font-variant-numeric: tabular-nums;
## }
##
## #eoduhsgxex .gt_font_normal {
## font-weight: normal;
## }
##
## #eoduhsgxex .gt_font_bold {
## font-weight: bold;
## }
##
## #eoduhsgxex .gt_font_italic {
## font-style: italic;
## }
##
## #eoduhsgxex .gt_super {
## font-size: 65%;
## }
##
## #eoduhsgxex .gt_footnote_marks {
## font-size: 75%;
## vertical-align: 0.4em;
## position: initial;
## }
##
## #eoduhsgxex .gt_asterisk {
## font-size: 100%;
## vertical-align: 0;
## }
##
## #eoduhsgxex .gt_indent_1 {
## text-indent: 5px;
## }
##
## #eoduhsgxex .gt_indent_2 {
## text-indent: 10px;
## }
##
## #eoduhsgxex .gt_indent_3 {
## text-indent: 15px;
## }
##
## #eoduhsgxex .gt_indent_4 {
## text-indent: 20px;
## }
##
## #eoduhsgxex .gt_indent_5 {
## text-indent: 25px;
## }
##
## #eoduhsgxex .katex-display {
## display: inline-flex !important;
## margin-bottom: 0.75em !important;
## }
##
## #eoduhsgxex div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {
## height: 0px !important;
## }
## </style>
## <table class="gt_table" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
## <thead>
## <tr class="gt_col_headings">
## <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="age_group">age_group</th>
## <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="n_confirmed">n_confirmed</th>
## <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="n_died">n_died</th>
## <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="cfr">cfr</th>
## </tr>
## </thead>
## <tbody class="gt_table_body">
## <tr><td headers="age_group" class="gt_row gt_right">0-17</td>
## <td headers="n_confirmed" class="gt_row gt_right">4988</td>
## <td headers="n_died" class="gt_row gt_right">2</td>
## <td headers="cfr" class="gt_row gt_right">0.04009623</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">18-29</td>
## <td headers="n_confirmed" class="gt_row gt_right">10754</td>
## <td headers="n_died" class="gt_row gt_right">13</td>
## <td headers="cfr" class="gt_row gt_right">0.12088525</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">30-44</td>
## <td headers="n_confirmed" class="gt_row gt_right">12427</td>
## <td headers="n_died" class="gt_row gt_right">54</td>
## <td headers="cfr" class="gt_row gt_right">0.43453770</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">45-64</td>
## <td headers="n_confirmed" class="gt_row gt_right">11801</td>
## <td headers="n_died" class="gt_row gt_right">304</td>
## <td headers="cfr" class="gt_row gt_right">2.57605288</td></tr>
## <tr><td headers="age_group" class="gt_row gt_right">65+</td>
## <td headers="n_confirmed" class="gt_row gt_right">5266</td>
## <td headers="n_died" class="gt_row gt_right">1329</td>
## <td headers="cfr" class="gt_row gt_right">25.23737182</td></tr>
## </tbody>
##
## </table>
## </div>
# Construir serie diaria a partir de report_date
daily <- df %>%
filter(!is.na(report_date)) %>%
count(report_date) %>%
arrange(report_date) %>%
complete(report_date = seq(min(report_date, na.rm=TRUE), max(report_date, na.rm=TRUE), by="day"), fill = list(n=0)) %>%
mutate(ma7 = zoo::rollmean(n, k = 7, fill = NA, align = "right"))
ggplot(daily, aes(x = report_date)) +
geom_col(aes(y = n)) +
geom_line(aes(y = ma7), size = 1) +
labs(title = "Casos diarios reportados y media móvil de 7 días",
x = "Fecha", y = "Casos") +
scale_x_date(date_labels = "%Y-%m", date_breaks = "1 month") +
theme_minimal()
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## Warning: Removed 6 rows containing missing values or values outside the scale range
## (`geom_line()`).
demog_plot_data <- df %>%
filter(!is.na(age_group) & !is.na(case_gender)) %>%
count(age_group, case_gender) %>%
group_by(age_group) %>%
mutate(pct = n / sum(n) * 100)
ggplot(demog_plot_data, aes(x = age_group, y = n, fill = case_gender)) +
geom_col(position = "stack") +
labs(title = "Distribución por grupo etario y género",
x = "Grupo etario", y = "Número de casos", fill = "Género") +
theme_minimal()
Los casos aumentan progresivamente desde el grupo de 0–17 años hasta el de 30–44 años, donde se presenta el mayor número de contagios. Posteriormente, disminuyen en los grupos de 45–64 y 65+, mostrando una tendencia descendente en los grupos de mayor edad. Además, se nota una mayor proporción de casos en mujeres en casi todos los grupos etarios.
# Unir hosp_by_age y cfr_by_age para graficar
plot_hosp <- hosp_by_age %>% select(age_group, pct_hosp)
plot_cfr <- cfr_by_age %>% select(age_group, cfr)
plot_join <- full_join(plot_hosp, plot_cfr, by = "age_group") %>%
pivot_longer(cols = -age_group, names_to = "metric", values_to = "value")
ggplot(plot_join, aes(x = age_group, y = value, group = metric, color = metric)) +
geom_line(aes(group=metric), size=1) +
geom_point(size=2) +
labs(title = "Tasa de hospitalización y letalidad (CFR) por grupo etario",
x = "Grupo etario", y = "Porcentaje (%)", color = "") +
theme_minimal()
# ============================================================
# BLOQUE 4.4: Síntomas principales por grupo etario
# ============================================================
library(tidyverse)
library(janitor)
library(ggplot2)
# Asegurarse de tener una columna de edad (ajustar el nombre si cambia)
# Por ejemplo: "edad", "age", "edad_anos", etc.
if(!"edad" %in% names(df_raw)){
edad_col <- names(df_raw)[str_detect(names(df_raw), "edad|age")][1]
df_raw <- df_raw %>% rename(edad = !!sym(edad_col))
}
# Crear grupos etarios
df_raw <- df_raw %>%
mutate(grupo_edad = case_when(
edad < 18 ~ "0-17",
edad >= 18 & edad < 30 ~ "18-29",
edad >= 30 & edad < 45 ~ "30-44",
edad >= 45 & edad < 60 ~ "45-59",
edad >= 60 ~ "60+",
TRUE ~ NA_character_
))
# --- Detectar automáticamente las columnas de síntomas ---
sym_cols <- names(df_raw)[str_detect(names(df_raw),
"symptom|sintom|tos|fiebre|dolor|cabeza|garganta|respira|malestar")]
# Seleccionamos las columnas que representan síntomas
sym_cols <- c(
"sym_fever", "sym_subjfever", "sym_myalgia",
"sym_losstastesmell", "sym_sorethroat",
"sym_cough", "sym_headache"
)
print(sym_cols)
## [1] "sym_fever" "sym_subjfever" "sym_myalgia"
## [4] "sym_losstastesmell" "sym_sorethroat" "sym_cough"
## [7] "sym_headache"
# --- Transformar datos a formato largo (long format) ---
df_sym <- df_raw %>%
select(grupo_edad, all_of(sym_cols)) %>%
pivot_longer(cols = all_of(sym_cols),
names_to = "sintoma",
values_to = "presente") %>%
filter(!is.na(grupo_edad)) %>%
mutate(presente = ifelse(presente %in% c("SI", "Si", "Yes", "1", 1, TRUE), 1, 0))
# --- Calcular proporciones por grupo etario ---
df_sym_summary <- df_sym %>%
group_by(grupo_edad, sintoma) %>%
summarise(porcentaje = mean(presente, na.rm = TRUE) * 100) %>%
ungroup()
## `summarise()` has grouped output by 'grupo_edad'. You can override using the
## `.groups` argument.
# --- Gráfico tipo heatmap ---
ggplot(df_sym_summary, aes(x = sintoma, y = grupo_edad, fill = porcentaje)) +
geom_tile(color = "white") +
scale_fill_gradient(low = "lightblue", high = "red") +
labs(
title = "Síntomas principales por grupo etario",
x = "Síntoma",
y = "Grupo de edad",
fill = "% de presencia"
) +
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
### Análisis de Síntomas Más Comunes por Grupo Etario
A partir del mapa de calor “Síntomas principales por grupo etario”, se identifican los síntomas con mayor porcentaje de presencia (colores rojo oscuro, \(\ge 30\%\)) para cada grupo de edad:
| Grupo de Edad | Síntomas Más Comunes (Mayor \(\%\) de Presencia) |
|---|---|
| 60+ | Tos (sym_cough), Fiebre
(sym_fever), Dolor de cabeza (sym_headache),
Dolor muscular (sym_myalgia), Dolor de garganta
(sym_sorethroat). |
| 45-59 | Tos (sym_cough), Fiebre
(sym_fever), Dolor de cabeza (sym_headache),
Dolor muscular (sym_myalgia), Dolor de garganta
(sym_sorethroat). |
| 30-44 | Tos (sym_cough), Fiebre
(sym_fever), Dolor de cabeza (sym_headache),
Dolor muscular (sym_myalgia), Dolor de garganta
(sym_sorethroat). |
| 18-29 | Tos (sym_cough), Fiebre
(sym_fever), Dolor de cabeza
(sym_headache). |
| 0-17 | Tos (sym_cough), Fiebre
(sym_fever), Dolor de cabeza
(sym_headache). |
sym_losstasteSmell) es notablemente
menos común en todos los grupos, excepto quizás en el grupo de 45-59 y
30-44, donde tiene una presencia moderada-alta (color rojo medio). En
los grupos 60+ y 0-17, su presencia es baja (color azul claro).sym_subjfever) parece tener una presencia baja a moderada
en todos los grupos.