date: 2020-05-04 06:46:33 PDT

METHOD

Data are retrieved from the NYTimes Github Repo. This plot is similar to the online chart published by the NYTimes with the addtion that points are encoded for daily estimated case doubling time (the inverse of the growth rate).

Growth is assumed to be exponential. \(t_{double}(t)\) is estimated by:

\[t_{double}(t) = \frac{\int_{0}^{t}cases(t')\; dt'}{cases(t)} \times \log(2)\]

where \(cases(t)\) is the daily reported cases of COVID-19 for a specific location.

Data are reticulated with a spline to reduce noise and derivatives are computed from this smoothed data.

The latest date recorded in the data is 2020-05-02.

HEAT MAP

The maps shows, for counties with > 10 cases, the location, number of current cases, and the calculated growth rate (expressed as doubling time). Shorter doubling times are obviously worse thaan longer doubling times.

As case growth goes to zero, doubling times will tend to infinity. Plots are currently capped at 25 days. Early in the crisis doubling times were on the order of ~ 3 days.

register_google(key = key_Wx)


## cmpute bounding Box

map_cases <- function(data_x = final_plot_data){


  bbox <- make_bbox(lat = lat, lon = lon, data = data_x, f = .1)
  
  c_lat <- (bbox[2] + bbox[4])/2
  c_lon <- (bbox[1] + bbox[3])/2 
  
  
  plot_colors <- c(brewer.pal(n = 11, name = "RdYlGn")[1:9], "#3392B2")
  plot_colors <- plot_colors[-(6:7)]
  
  p <- ggmap(get_googlemap(state_x,
                      zoom = 6 ,scale = 1,
                      maptype ='terrain',
                      color = 'bw', region = "", style = c( 'feature:administrative.country|element:labels|visibility:off', 'feature:administrative.state|element:labels|visibility:on')))
  

  
  q <- p + geom_point(data = data_x %>% filter(date == max(date))%>%arrange(desc(cases))%>%filter(cases>10), aes(x = lon, y = lat,  size = cases, fill = double_time, group = fips), pch=21, alpha = 0.7, color = "grey20") + 
    theme(legend.position="top") +
    xlim(bbox[1], bbox[3]) +
    ylim(bbox[2], bbox[4])+
    scale_size_continuous( breaks=c(8, 64, 512, 4096, 32768), range = c(1, 40))+ theme_bw()+
    scale_fill_gradientn(colors =plot_colors, name = "t(days)") + 
    theme(axis.title.x=element_blank(),
          axis.text.x=element_blank(),
          axis.ticks.x=element_blank(),
          axis.title.y=element_blank(),
          axis.text.y=element_blank(),
          axis.ticks.y=element_blank()) +
    labs(title = str_c('COVID-19 CASE HEAT MAP:', "  ", toupper(state_x)), subtitle=str_c("Data from NYTimes COVID19 Database. Color indicates case-doubling time (in days).","")) +
    annotate(geom="text", x=max(data_x$lon[!is.na(data_x$lon)]), y=min(data_x$lat[!is.na(data_x$lat)]), label=str_c("ww44ss ", today() ), size = 2,
              color="Grey30") #+
  
    # transition_time(date)+
    # ease_aes('linear')
      
    return(q)
}

This results saved as heat_map2020_05_04_06_48_20.jpg

SEVERITY

We can use this data to compute expected new cases in the short term. This is a ranking of “severity.” based on both the number of current cases and also the grwowth rate.

From the model above we can forecast

\[{cases(t)} = {cases(t_0)} \times \ 2^{(t-t_0)/t_d}\]

where \(t_0\) is today and \(t\) is some date in the future. The severity \(S\) is the ranked extrapoloated number of new cases over the next \(t - t_0 = 14 \; days\). Fourteen days is roughly the time it takes for social controls to be effective in reducing the growth rate.

county state current cases doubling time case rank severity rank
Los Angeles California 24894 14.09 1 1
San Diego California 3905 14.10 3 2
Orange California 2660 14.01 4 3
Riverside California 4164 20.25 2 4
San Bernardino California 2182 16.15 6 5
Santa Clara California 2204 25.00 5 6
Alameda California 1726 21.75 7 7
Kings California 158 4.83 27 8
Tulare California 720 12.24 13 9
San Francisco California 1552 25.00 8 10
San Mateo California 1233 20.56 9 11
Fresno California 633 12.86 14 12
Kern California 972 17.86 11 13

The table generally follows the ranking of the number of cases, but there are some surprises.