COVID-19 cases in Oregon are increasing rapidly in the Willamette valley with doubling times of ~ 4 to 6 days. Total cases in Greater Oregon is still below 100, so measurements of growth rates are not as reliable, but the doubling times appear to be shorter (in the range of 3 to 5).
Get data from the NYTimes Github Repo.
countydata_file <- "https://raw.githubusercontent.com/nytimes/covid-19-data/master/us-counties.csv"
county_data <- read_csv(countydata_file)
## Parsed with column specification:
## cols(
## date = col_date(format = ""),
## county = col_character(),
## state = col_character(),
## fips = col_character(),
## cases = col_double(),
## deaths = col_double()
## )
###Patch data
There’s a faulty data point in the data for Benton County (total cases drops on 2020-03-25. This fix just patches that. Issue has been escalated on the github repo.
willamette_region <- c("Multnomah", "Clackamas", "Washington", "Marion", "Yamhill", "Linn", "Benton", "Lane" )
state_metro_data <- county_data %>%
filter(state == "Oregon") %>%
mutate(region = ifelse(county %in% willamette_region, "Willamette Valley", "Greater Oregon")) %>%
yo
Plot data is created by summarizing data by metro area. Daily case rates are also computed adn shown as the gray area plot. (the colored line is essnetially the integral of the grey area).
plot_data <- state_metro_data %>%
group_by(region, date) %>%
summarize(cases = sum(cases), deaths = sum(deaths)) %>%
mutate(daily_cases = cases-lag(cases)) %>%
mutate(daily_deaths = deaths-lag(deaths)) %>%
arrange(date)%>%
ungroup() %>%
mutate(daily_cases = ifelse(is.na(daily_cases), 0, daily_cases)) %>%
mutate(daily_deaths = ifelse(is.na(daily_deaths), 0, daily_deaths)) %>%
filter(cases > 1) %>%
#filter(deaths >1) %>%
mutate(t_case = daily_cases/(cases))%>%
#mutate(t_death = daily_deaths/(deaths-1)) %>%
yo
This can be done a number of ways. Using the mean data for last few days seems to work well. In this case I compute mulitple measurements to do a rough and ready job of estimating uncertainty. It’s not really kisher staistically, but it gives an idea of the magnitude of variance.
Here is the (noisy) doubling time data computed on a daily basis (Blue line with a smoothed trend line overlayed) and shown along with the daily cases.