Quick and dirty visualization of COVID-19 case data from the Colorado Dept. of Public Health & Environment
This project is maintained by stufield
This page highlights the COVID-19 cases in Colorado both through time
and by county (CO has 64 counties).
Data is obtained from the Colorado Department of Public Health & Environment (CDPHE).
See the CDPHE website for
more information and raw case data.
| Metric | number |
|---|---|
| Cases | 14316 |
| Hospitalizations | 2571 |
| Counties | 56 |
| People Tested | 67094 |
| Deaths | 736 |
| Outbreaks | 149 |
| Sex | Percent |
|---|---|
| Female | 50.96% |
| Male | 47.69% |
| Male to Female | 0.01% |
| Unknown | 1.34% |
covid_data %>%
dplyr::filter(
description == "Cases of COVID-19 Reported in Colorado by Age Group, Hospitalization, and Outcome" &
!is.na(value)) %>%
tidyr::separate(attribute, into = c("Age", "Outcome"), sep = ", ") %>%
dplyr::select(Age, Outcome, Cases = value) %>%
ggplot(aes(x = Age, y = Cases, group = Outcome)) +
geom_bar(stat = "identity", aes(fill = Outcome)) +
ggtitle("Case Proportion by Age & Outcome")

covid_data %>%
dplyr::filter(description == "Colorado Case Counts by County" & metric == "Cases") %>%
dplyr::mutate(County = stringr::str_remove(attribute, " County$")) %>%
dplyr::filter(County != "Grand Total") %>%
ggplot(aes(y = value, x = reorder(County, -value))) +
geom_bar(stat = "identity") +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(y = "Cases", title = "Colorado Cases by County", x = "County")

time_data <- covid_data %>%
dplyr::filter(
description == "Cases of COVID-19 in Colorado by Date Reported to the State" &
!is.na(value)) %>%
dplyr::mutate(
date = as.Date(trunc(strptime(attribute, format = "%Y-%m-%d", tz = "MST"), "day")),
total = cumsum(value)
)
time_data %>%
ggplot(aes(x = date, y = value)) +
geom_point(size = 2) +
geom_smooth(method = "loess", se = FALSE) +
scale_x_date(breaks = time_data$date) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(y = "Cases", title = "Colorado Cases by Date", x = "")

Created by Rmarkdown (v2.1) and R version 3.6.3 (2020-02-29).