cases_by_county %>%
slice_max(order_by = rate_per_1000, n = 10) %>%
ggplot(aes(x = rate_per_1000, y = reorder(county, rate_per_1000))) +
geom_col(fill = "sienna3") +
labs(
title = "California counties with the highest infection rates",
subtitle = paste(
"Reporting weeks dated",
"May 29–December 25, 2023"
),
x = "Recorded infections per 1,000 residents",
y = "County",
caption = paste(
"2023 population estimates.\n",
"All ages and both sexes combined. Rates are not age-adjusted."
)
)+
theme_minimal() +
theme(
plot.title = element_text(face = "bold"),
axis.text.y = element_text(size = 8)
)Simulated Respiratory Disease Outbreak in California
Research Question
Your supervisors are interested to know the course of the outbreak, if it is disproportionately affecting certain demographic or geographic populations and how prevention and treatment resources should be allocated.
Data Preparation
Visualization 1
Interpretation
The respiratory disease outbreak is affecting Imperial County at twice the rate of the next most infected county. More than 1 in 10 residents of Imperial County has been infected.
Visualization 2
aggregated_cases_race <- combined_cases %>%
group_by(race_eth) %>%
summarise(
cumulative_infected = sum(dx_new, na.rm = TRUE),
cumulative_severe = sum(new_severe, na.rm = TRUE),
cumulative_unrecovered = sum(new_unrecovered, na.rm = TRUE),
.groups = "drop"
)
aggregated_cases_county <- combined_cases %>%
group_by(county) %>%
summarise(
cumulative_infected = sum(dx_new, na.rm = TRUE),
cumulative_severe = sum(new_severe, na.rm = TRUE),
cumulative_unrecovered = sum(new_unrecovered, na.rm = TRUE),
.groups = "drop"
)
race_table <- cases_by_race %>%
arrange(desc(rate_per_1000)) %>%
mutate(
race_eth = case_when(
race_eth == "White, Non-Hispanic" ~ "White (NH)",
race_eth == "Black, Non-Hispanic" ~ "Black (NH)",
race_eth == "American Indian or Alaska Native, Non-Hispanic" ~
"American Indian or Alaska Native (NH)",
race_eth == "Asian, Non-Hispanic" ~ "Asian (NH)",
race_eth == "Native Hawaiian or Pacific Islander, Non-Hispanic" ~
"Native Hawaiian or Pacific Islander (NH)",
race_eth == "Multiracial (two or more of above races), Non-Hispanic" ~
"Multiracial (NH)",
TRUE ~ race_eth
)
) %>%
select(race_eth, pop, cumulative_infected, rate_per_1000,
cumulative_severe, severe_rate_per_1000) %>%
gt() %>%
tab_header(
title = "Recorded infections and severe cases by race/ethnicity",
subtitle = "California | Reporting weeks dated May 29–December 25, 2023"
) %>%
cols_label(
race_eth = "Race/ethnicity",
pop = "2023 population",
cumulative_infected = "Infections",
rate_per_1000 = "Infections per 1,000",
cumulative_severe = "Severe cases",
severe_rate_per_1000 = "Severe cases per 1,000"
) %>%
fmt_number(
columns = c(pop, cumulative_infected, cumulative_severe),
decimals = 0, use_seps = TRUE
) %>%
fmt_number(
columns = c(rate_per_1000, severe_rate_per_1000),
decimals = 2
) %>%
cols_align(align = "left", columns = race_eth) %>%
cols_width(
race_eth ~ pct(32),
c(pop, cumulative_infected, rate_per_1000,
cumulative_severe, severe_rate_per_1000) ~ pct(13.6)
) %>%
tab_source_note(
"Source: California and Los Angeles morbidity datasets; 2023 population estimates."
) %>%
tab_source_note(
paste(
"All ages and both sexes combined. NH = non-Hispanic.",
"Rates = cases / group population × 1,000; these are crude, not age-adjusted rates.",
"Rows are ordered by infection rate, highest first. Counts and rates summarize the full study period."
)
) %>%
opt_row_striping() %>%
tab_options(
table.font.names = "Arial",
table.font.size = px(13),
table.width = pct(100),
heading.align = "left",
data_row.padding = px(9)
)
race_table| Recorded infections and severe cases by race/ethnicity | |||||
|---|---|---|---|---|---|
| California | Reporting weeks dated May 29–December 25, 2023 | |||||
| Race/ethnicity | 2023 population | Infections | Infections per 1,000 | Severe cases | Severe cases per 1,000 |
| Hispanic (any race) | 14,829,946 | 137,804 | 9.29 | 3,406 | 0.23 |
| Black (NH) | 2,211,518 | 18,921 | 8.56 | 980 | 0.44 |
| Native Hawaiian or Pacific Islander (NH) | 153,729 | 917 | 5.97 | 24 | 0.16 |
| Asian (NH) | 6,295,420 | 28,884 | 4.59 | 1,967 | 0.31 |
| White (NH) | 13,848,282 | 53,616 | 3.87 | 4,060 | 0.29 |
| American Indian or Alaska Native (NH) | 158,672 | 538 | 3.39 | 34 | 0.21 |
| Multiracial (NH) | 1,611,503 | 5,450 | 3.38 | 119 | 0.07 |
| Source: California and Los Angeles morbidity datasets; 2023 population estimates. | |||||
| All ages and both sexes combined. NH = non-Hispanic. Rates = cases / group population × 1,000; these are crude, not age-adjusted rates. Rows are ordered by infection rate, highest first. Counts and rates summarize the full study period. | |||||
Interpretation
The highest crude infection rate was recorded among the non-Hispanic American Indian or Alaska Native group (139.88 per 1,000 residents), while the non-Hispanic White group recorded the highest severe-case rate (4.58 per 1,000) and the largest severe-case count (63,448). Prevention planning can consider groups with higher infection rates, while treatment-capacity planning should consider severe-case counts alongside rates and local service needs.
Visualization 3
ggplot(
cases_by_race,
aes(
x = reorder(race_eth, rate_per_1000),
y = rate_per_1000
)
) +
geom_col(fill = "steelblue3") +
coord_flip() +
labs(
title = "Infection rates by race and ethnicity",
subtitle = "California and Los Angeles County, May-December 2023",
x = "Race/ethnicity",
y = "Recorded infections per 1,000 residents",
caption = paste(
"Source: California and Los Angeles County morbidity datasets;",
"2023 California population estimates.",
"\nRates are crude (not age-adjusted) and calculated as",
"cumulative infections divided by population × 1,000."
)
) +
scale_y_continuous(labels = comma_format(accuracy = 0.1)) +
theme_minimal() +
theme(
plot.title = element_text(face = "bold", size = 12),
axis.text.y = element_text(size = 8)
)Interpretation The burden of infection was not evenly distributed across racial and ethnic groups. Some populations experienced substantially higher infection rates per 1,000 residents, suggesting that prevention and outreach resources may need to be prioritized toward groups with the highest rates of disease.
Visualization 4
combined_cases %>%
group_by(dt_report) %>%
summarize(
new_cases = sum(dx_new, na.rm = TRUE)
) %>%
ggplot(aes(x = dt_report, y = new_cases)) +
geom_line(
color = "steelblue",
linewidth = 1
) +
labs(
title = "Cases over time",
subtitle = "California reporting weeks, May–December 2023",
x = "Reporting week",
y = "New reported cases",
caption = paste(
"Source: Combined California and Los Angeles County surveillance datasets.",
"Values represent weekly reported infections."
)
) +
theme_minimal() +
theme(
plot.title = element_text(face = "bold", size = 14),
plot.subtitle = element_text(size = 11),
axis.title = element_text(face = "bold"),
plot.caption = element_text(size = 8),
panel.grid.minor = element_blank()
) +
scale_y_continuous(labels = comma)Interpretation The epidemic curve shows how the outbreak changed over time, identifying periods of increasing and decreasing transmission. Peaks in the curve represent weeks with the greatest disease activity and can help guide when prevention resources and healthcare capacity were most needed.
Conclusions
The outbreak burden was not evenly distributed across California. Imperial County experienced the highest infection rate, while several racial and ethnic populations experienced substantially higher infection rates than others. These findings suggest that prevention resources should be prioritized toward communities with elevated infection rates and that treatment capacity should be directed toward areas experiencing larger numbers of severe cases.