Packages

install.packages(c("biglm", "dplyr", "ggplot2", "readr", "targets", "tidyr"))
options(repos = c(RSPM = "https://packagemanager.datascience.kdhe.ks.gov/cran/latest"))

Setup

library(targets)
tar_unscript()

Globals

options(tidyverse.quiet = TRUE)
tar_option_set(packages = c("biglm", "dplyr", "ggplot2", "readr", "tidyr", "knitr", "scales"))

tar_source()
#> Establish _targets.R and _targets_r/globals/pkgs.R.
list(
  tar_target(raw_data_store, file.path("~", "Projects", "Reports", "pb_report_2025", "_targets"))
)

#> Establish _targets.R and _targets_r/targets/keydirs.R.

Targets

list(
  tar_target(child_tables, tar_read(child_tables, store = raw_data_store)), 
  tar_target(ks_sum24_df, cbls_summarize(child_tables)), 
  tar_target(dedup_all_df, tar_read(pb_dedup_lst, store = raw_data_store)[["distinct"]]), 
  tar_target(tests_count_24, count2024tests(dedup_all_df))
)
#> Establish _targets.R and _targets_r/targets/downstream-targets.R.
knitr::kable(tar_read(ks_sum24_df))
FIPS CNTYCODE lab_collection_county ntested pct_tested ge3.5.lt10_2024 ge10_2024 conf_elev_2024 pct_elev POP2024
20001 AL Allen 127 14.4 5 0 5 3.9 884
20003 AN Anderson 92 15.3 4 2 6 6.5 601
20005 AT Atchison 114 11.1 4 1 5 4.4 1029
20007 BA Barber 37 13.2 3 0 3 8.1 280
20009 BT Barton 263 14.8 18 6 24 9.1 1783
20011 BB Bourbon 157 13.7 9 1 10 6.4 1144
20013 BR Brown 78 12.4 8 0 8 10.3 628
20015 BU Butler 272 6.1 9 0 9 3.3 4469
20017 CS Chase 18 12.9 3 0 3 16.7 140
20019 CQ Chautauqua 59 27.3 5 1 6 10.2 216
20021 CK Cherokee 323 26.0 20 2 22 6.8 1242
20023 CN Cheyenne 37 18.7 0 0 0 0.0 198
20025 CA Clark 9 7.3 1 0 1 11.1 123
20027 CY Clay 72 13.9 4 2 6 8.3 517
20029 CD Cloud 65 10.5 5 0 5 7.7 621
20031 CF Coffey 86 16.2 4 0 4 4.7 530
20033 CM Comanche 12 10.7 1 0 1 8.3 112
20035 CL Cowley 728 30.3 25 7 32 4.4 2400
20037 CR Crawford 447 17.1 10 3 13 2.9 2608
20039 DC Decatur 25 14.0 3 0 3 12.0 178
20041 DK Dickinson 122 9.0 3 0 3 2.5 1351
20043 DP Doniphan 79 17.2 4 2 6 7.6 460
20045 DG Douglas 571 9.3 6 2 8 1.4 6126
20047 ED Edwards 36 18.5 0 0 0 0.0 195
20049 EK Elk 7 5.3 1 0 1 14.3 133
20051 EL Ellis 259 15.0 12 2 14 5.4 1722
20053 EW Ellsworth 54 15.9 4 0 4 7.4 339
20055 FI Finney 611 17.8 10 2 12 2.0 3431
20057 FO Ford 640 19.1 11 6 17 2.7 3352
20059 FR Franklin 178 9.7 6 0 6 3.4 1828
20061 GE Geary 613 13.3 5 1 6 1.0 4626
20063 GO Gove 18 8.2 2 0 2 11.1 219
20065 GH Graham 40 26.5 2 1 3 7.5 151
20067 GT Grant 83 13.2 0 0 0 0.0 627
20069 GY Gray 43 8.5 1 1 2 4.7 506
20071 GL Greeley 37 44.6 1 0 1 2.7 83
20073 GW Greenwood 34 9.4 7 1 8 23.5 360
20075 HM Hamilton 39 16.4 0 0 0 0.0 238
20077 HP Harper 47 11.5 2 0 2 4.3 407
20079 HV Harvey 291 12.9 8 1 9 3.1 2261
20081 HS Haskell 35 10.4 0 0 0 0.0 335
20083 HG Hodgeman 3 2.4 0 0 0 0.0 124
20085 JA Jackson 83 7.4 1 0 1 1.2 1120
20087 JF Jefferson 109 9.4 3 2 5 4.6 1161
20089 JW Jewell 27 15.8 2 0 2 7.4 171
20091 JO Johnson 4819 11.2 39 5 44 0.9 43068
20093 KE Kearny 60 17.0 0 0 0 0.0 352
20095 KM Kingman 57 11.9 4 0 4 7.0 477
20097 KW Kiowa 15 7.1 1 0 1 6.7 210
20099 LB Labette 186 13.1 10 2 12 6.5 1424
20101 LE Lane 9 8.6 0 0 0 0.0 105
20103 LV Leavenworth 760 12.7 15 4 19 2.5 6007
20105 LC Lincoln 43 21.6 3 0 3 7.0 199
20107 LN Linn 78 12.4 3 0 3 3.8 631
20109 LG Logan 52 21.8 3 2 5 9.6 238
20111 LY Lyon 364 17.1 22 4 26 7.1 2127
20113 MP McPherson 254 13.0 8 0 8 3.1 1954
20115 MN Marion 98 13.8 7 1 8 8.2 709
20117 MS Marshall 91 13.3 11 1 12 13.2 685
20119 ME Meade 27 9.0 0 0 0 0.0 301
20121 MI Miami 306 13.1 3 1 4 1.3 2327
20123 MC Mitchell 20 4.5 1 1 2 10.0 448
20125 MG Montgomery 381 19.1 33 7 40 10.5 1997
20127 MR Morris 30 10.3 0 0 0 0.0 291
20129 MT Morton 9 5.4 0 0 0 0.0 167
20131 NM Nemaha 69 8.8 8 1 9 13.0 782
20133 NO Neosho 144 13.2 9 0 9 6.2 1095
20135 NS Ness 24 12.2 2 1 3 12.5 196
20137 NT Norton 51 15.7 2 0 2 3.9 325
20139 OS Osage 78 8.2 4 1 5 6.4 954
20141 OB Osborne 22 9.6 2 0 2 9.1 229
20143 OT Ottawa 53 14.0 5 2 7 13.2 378
20145 PN Pawnee 84 27.4 8 4 12 14.3 307
20147 PL Phillips 25 8.1 1 0 1 4.0 309
20149 PT Pottawatomie 185 8.1 1 0 1 0.5 2271
20151 PR Pratt 56 8.3 4 1 5 8.9 678
20153 RA Rawlins 35 17.9 0 0 0 0.0 196
20155 RN Reno 590 15.2 29 2 31 5.3 3888
20157 RP Republic 25 8.4 1 0 1 4.0 298
20159 RC Rice 88 12.8 6 1 7 8.0 687
20161 RL Riley 583 14.8 9 1 10 1.7 3935
20163 RO Rooks 31 9.9 1 0 1 3.2 314
20165 RH Rush 28 17.9 2 0 2 7.1 156
20167 RS Russell 60 15.3 5 4 9 15.0 391
20169 SA Saline 502 13.6 36 7 43 8.6 3683
20171 SC Scott 75 17.9 0 1 1 1.3 420
20173 SG Sedgwick 4791 12.0 96 19 115 2.4 39988
20175 SW Seward 201 9.0 6 0 6 3.0 2227
20177 SN Shawnee 1455 12.3 48 5 53 3.6 11862
20179 SD Sheridan 34 21.5 2 0 2 5.9 158
20181 SH Sherman 70 17.9 0 0 0 0.0 391
20183 SM Smith 9 4.4 2 0 2 22.2 203
20185 SF Stafford 39 14.8 3 1 4 10.3 263
20187 ST Stanton 34 17.7 2 0 2 5.9 192
20189 SV Stevens 29 7.2 1 0 1 3.4 401
20191 SU Sumner 157 10.0 9 1 10 6.4 1573
20193 TH Thomas 120 19.9 1 1 2 1.7 604
20195 TR Trego 21 13.0 0 0 0 0.0 161
20197 WB Wabaunsee 32 6.5 2 0 2 6.2 495
20199 WA Wallace 30 20.4 1 0 1 3.3 147
20201 WS Washington 26 5.9 3 1 4 15.4 442
20203 WH Wichita 54 28.6 1 0 1 1.9 189
20205 WL Wilson 64 11.2 1 0 1 1.6 572
20207 WO Woodson 11 6.5 2 0 2 18.2 169
20209 WY Wyandotte 2705 18.7 82 13 95 3.5 14439
20 N/A Kansas 27429 13.0 792 141 933 3.4 210714

Pipeline

tar_make()
#> ✔ skipped pipeline [112ms, 5 skipped]

Output

Total Number of tests for 2024 = 45,090

tar_visnetwork()