Contact tracing counts for United States from testandtrace.com

test_and_trace_data()

Value

a data.frame

Details

From the testandtrace website:

  1. Countries with successful test and trace programs have less than 3% positive tests (meaning that they have enough testing capabilities to test aggressively). Source

  2. A state needs ~5-15 contact tracers per daily positive test (contact tracers interview infected patients about who they’ve had close contact with, and then call those people to help them get tested and quarantined). Source

Suggested Grading Scale: Conducted on a 6 point scale with a 6/6 meaning that a state meets the necessary testing availability and tracing team size benchmarks to successfully test and trace.

Testing Grades:

  • 3 points for under 3% positive tests

  • 2 point for 3-5.5% positive tests

  • 1 point for 5.5-8% positive tests

  • 0 points if over 8% positive tests

Tracing Grades:

  • 3 points for 5-15+ tracers per daily positive case

  • 2 points for 2.5-5 tracers per daily positive case

  • 1 point for 1-2.5 tracers per daily positive case

  • 0 points for under 1 tracer per daily positive case

Examples

TAndT = test_and_trace_data()
#> Warning: download failed
#>   web resource path: ‘https://github.com/covid-projections/covid-data-public/raw/main/data/test-and-trace/state_data.csv’
#>   local file path: ‘~/.cache/sars2pack/3f42196923d7_state_data.csv’
#>   reason: Not Found (HTTP 404).
#> Warning: bfcadd() failed; resource removed
#>   rid: BFC155
#>   fpath: ‘https://github.com/covid-projections/covid-data-public/raw/main/data/test-and-trace/state_data.csv’
#>   reason: download failed
#> Error in .util_download(x, rid[i], proxy, config, "bfcadd()", ...): bfcadd() failed; see warnings()
head(TAndT)
#> Error in head(TAndT): object 'TAndT' not found
colnames(TAndT)
#> Error in is.data.frame(x): object 'TAndT' not found
dplyr::glimpse(TAndT)
#> Error in dplyr::glimpse(TAndT): object 'TAndT' not found

nyt = nytimes_state_data() %>% dplyr::select(-state) %>%
    dplyr::filter(subset=='confirmed') %>%
    add_incidence_column(grouping_columns = 'fips')
    
testers = TAndT %>%
    dplyr::mutate(date=as.Date(.data$date)) %>%
    dplyr::left_join(nyt, c('fips'='fips','date'='date')) %>%
    dplyr::mutate(tracers_per_new_case = contact_tracers_count/inc)
#> Error in dplyr::mutate(., date = as.Date(.data$date)): object 'TAndT' not found

require(ggplot2)
testers %>% dplyr::filter(date==Sys.Date()-4) %>%
    ggplot(aes(x=reorder(iso2c,tracers_per_new_case),y=tracers_per_new_case)) +
    geom_bar(stat='identity') +
    coord_flip() +
    xlab('State or Jurisdiction') +
    ylab('Contract tracers per new case') +
    ggtitle(sprintf('Contract tracers per new case on %s', Sys.Date() - 4), 
            subtitle='Goal is 5-15 tracers per new case')
#> Error in dplyr::filter(., date == Sys.Date() - 4): object 'testers' not found