R/test_and_trace.R
test_and_trace_data.Rd
Contact tracing counts for United States from testandtrace.com
test_and_trace_data()
a data.frame
From the testandtrace website:
Countries with successful test and trace programs have less than 3% positive tests (meaning that they have enough testing capabilities to test aggressively). Source
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
Other data-import:
acaps_government_measures_data()
,
acaps_secondary_impact_data()
,
apple_mobility_data()
,
beoutbreakprepared_data()
,
cci_us_vaccine_data()
,
cdc_aggregated_projections()
,
cdc_excess_deaths()
,
cdc_social_vulnerability_index()
,
coronadatascraper_data()
,
coronanet_government_response_data()
,
cov_glue_lineage_data()
,
cov_glue_newick_data()
,
cov_glue_snp_lineage()
,
covidtracker_data()
,
descartes_mobility_data()
,
ecdc_data()
,
econ_tracker_consumer_spending
,
econ_tracker_employment
,
econ_tracker_unemp_data
,
economist_excess_deaths()
,
financial_times_excess_deaths()
,
google_mobility_data()
,
government_policy_timeline()
,
jhu_data()
,
jhu_us_data()
,
kff_icu_beds()
,
nytimes_county_data()
,
oecd_unemployment_data()
,
owid_data()
,
param_estimates_published()
,
us_county_geo_details()
,
us_county_health_rankings()
,
us_healthcare_capacity()
,
us_hospital_details()
,
us_state_distancing_policy()
,
usa_facts_data()
,
who_cases()
Other case-tracking:
align_to_baseline()
,
beoutbreakprepared_data()
,
bulk_estimate_Rt()
,
combined_us_cases_data()
,
coronadatascraper_data()
,
covidtracker_data()
,
ecdc_data()
,
estimate_Rt()
,
jhu_data()
,
nytimes_county_data()
,
owid_data()
,
plot_epicurve()
,
usa_facts_data()
,
who_cases()
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