date: 2020-04-29 07:35:53 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-04-27.

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_04_29_07_36_49.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 20417 11.23 1 1
Riverside California 3643 16.13 2 2
San Diego California 3141 14.63 3 3
Orange California 2126 16.54 4 4
San Bernardino California 1772 15.11 6 5
Alameda California 1519 17.60 7 6
Santa Clara California 2105 25.00 5 7
San Francisco California 1427 21.61 8 8
Kern California 837 16.46 12 9
San Mateo California 1080 21.18 9 10
Fresno California 498 12.72 16 11
Sacramento California 1045 25.00 10 12
Imperial California 284 10.05 19 13

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