-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdata-dictionary.Rmd
876 lines (692 loc) · 31 KB
/
data-dictionary.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
---
title: "Indiana COVID-19 Project Data Dictionary"
author: "Eric Book"
date: "`r format(Sys.time(), '%B %d, %Y')`"
output:
html_document:
toc: TRUE
toc_float: TRUE
---
```{r, setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE,
warning = FALSE,
message = FALSE,
out.width = "100%",
collapse = TRUE)
library(readr)
library(glue)
library(dplyr)
library(gt)
library(gtsummary)
```
Data files described in this dictionary are located in the [data](https://github.com/ercbk/Indiana-COVID-19-Tracker/tree/master/data) directory of the Indiana-COVID-19-Tracker repository and the [data](https://github.com/ercbk/Indiana-COVIDcast-Dashboard/tree/master/data) directory of the Indiana-COVIDcast-Dashboard repository.
\
\
## Historical Weekly COVID-19 Cases by Age for Indiana
#### Description
Processed data for Demographics [heatmaps](https://ercbk.github.io/Indiana-COVID-19-Website/demographics.html#cases-by-age) that shows a breakdown of weekly COVID-19 cases by age group.
#### File name
age-cases-heat.rds
#### Script
Processing: [process-demog-data.R](https://github.com/ercbk/Indiana-COVID-19-Tracker/blob/master/R/process/process-demog-data.R)
#### Raw Sources
Indiana Data Hub: [COVID-19 CASE DEMOGRAPHICS](https://hub.mph.in.gov/dataset/covid-19-case-demographics)
tidycensus R package: [website](https://walker-data.com/tidycensus/), 2018 age populations for Indiana
#### Notes
Other variables:
- `end_date`: Ordered factor; date of the last day of the weekly interval
- `daily_cases`: Cases for the `end_date`; vestigial column that was used to calculate `weekly_cases`
- `pop`: 2018 age populations for Indiana that's used to calculate `prop_cases`
\
```{r, asis=TRUE}
ach <- read_rds("data/age-cases-heat.rds")
ach_var_defs <- c("Age group",
"",
"",
"",
"",
"",
"",
"",
"",
"Weekly count of COVID-19 confirmed cases by age group",
"Number of cases scaled to per 1000 residents per age group")
# table width responsive to length of var_defs text, so may not appear full.width
# use show_header_names to get col names being used by tbl_summary
tbl_summary(ach,
missing = "ifany",
missing_text = "Missing",
include = c(age_grp, weekly_cases, prop_cases)) %>%
modify_header(update = list(
label ~ 'Variable')) %>%
modify_table_body(dplyr::mutate, defs = ach_var_defs) %>%
modify_header(defs = "Definition") %>%
# show_header_names()
as_gt() %>%
tab_options(table.align = "left") %>%
cols_align("left", vars(stat_0, defs)) %>%
as_raw_html()
```
\
\
\
## Historical Weekly COVID-19 Deaths by Age Group for Indiana
#### Description
Processed data for Demographics [line charts](https://ercbk.github.io/Indiana-COVID-19-Website/demographics.html#deaths-by-age) that shows counts and trends of weekly COVID-19 deaths by age group.
#### File name
age-death-line.rds
#### Script
Processing: [process-demog-data.R](https://github.com/ercbk/Indiana-COVID-19-Tracker/blob/master/R/process/process-demog-data.R)
#### Raw Sources
Indiana Data Hub: [COVID-19 CASE DEMOGRAPHICS](https://hub.mph.in.gov/dataset/covid-19-case-demographics)
#### Notes
Other variables:
- `end_date`: date of the last day of the weekly interval
- `date_text`: date label for the chart
- `tooltip`: pop-up text for points in chart with death counts and date
\
```{r, asis=TRUE}
adl <- read_rds("data/age-death-line.rds")
adl_var_defs <- c("Age group",
"",
"",
"",
"",
"",
"",
"",
"",
"Weekly count of COVID-19 confirmed deaths by age group")
# table width responsive to length of var_defs text, so may not appear full.width
# use show_header_names to get col names being used by tbl_summary
tbl_summary(adl,
missing = "ifany",
missing_text = "Missing",
include = c(agegrp, weekly_total)) %>%
modify_header(update = list(
label ~ 'Variable')) %>%
modify_table_body(dplyr::mutate, defs = adl_var_defs) %>%
modify_header(defs = "Definition") %>%
# show_header_names()
as_gt() %>%
tab_options(table.align = "left") %>%
cols_align("left", vars(stat_0, defs)) %>%
as_raw_html()
```
\
\
\
## Historical Daily COVID-19 Hospital Admissions by Age Group for Indiana
#### Description
Raw data for the Hospitals [line charts](https://ercbk.github.io/Indiana-COVID-19-Website/hospitals.html#state-hospital-mortality-staffing-shortages-admissions) that shows daily COVID-19 hospital admissions by age group and gender.
#### File name
age-hosp-line.rds
#### Script
Collection: [scrape-regenstrief-tableau.R](https://github.com/ercbk/Indiana-COVID-19-Tracker/blob/master/R/collection/scrape-regenstrief-tableau.R)
#### Raw Sources
Regenstrief Institute: [dashboard](https://www.regenstrief.org/covid-dashboard/)
#### Notes
This dataset is incomplete with random gaps between days.
Other variables:
- `date`: yyyy-mm-dd format
\
```{r, asis=TRUE}
ahl <- read_rds("data/age-hosp-line.rds")
ahl_var_defs <- c("Age group",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"Daily COVID-19 male hospital admissions by age group",
"Daily COVID-19 female hospital admissions by age group",
"Daily COVID-19 total hospital admissions by age group")
# table width responsive to length of var_defs text, so may not appear full.width
# use show_header_names to get col names being used by tbl_summary
tbl_summary(ahl,
missing = "ifany",
missing_text = "Missing") %>%
modify_header(update = list(
label ~ 'Variable')) %>%
modify_table_body(dplyr::mutate, defs = ahl_var_defs) %>%
modify_header(defs = "Definition") %>%
# show_header_names()
as_gt() %>%
tab_options(table.align = "left") %>%
cols_align("left", vars(stat_0, defs)) %>%
as_raw_html()
```
\
\
\
## Historical Daily ICU Beds and Ventilators for Indiana
#### Description
Raw data for the Static Charts [Hospitalizations, ICU Beds and Ventilator Availability](https://ercbk.github.io/Indiana-COVID-19-Website/static.html#Hospitalizations,_ICU_Beds_and_Ventilator_Availability) that shows resource counts of ICU beds and ventilators.
#### File name
beds-vents-complete.csv
#### Script
Collection: [build-datasets.R](https://github.com/ercbk/Indiana-COVID-19-Tracker/blob/master/R/collection/build-datasets.R)
#### Raw Sources
Indiana Data Hub: [COVID-19 BEDS AND VENTS](https://hub.mph.in.gov/dataset/covid-19-beds-and-vents)
#### Notes
The source publishs daily excel spreadsheets with total resource counts, and these spreadsheets are collected and joined daily to produce a dataset with historical values.
Other variables:
- `date`: yyyy-mm-dd format
\
```{r, asis=TRUE}
bvc <- read_csv("data/beds-vents-complete.csv")
bvc_var_defs <- c("Total ICU beds",
"Total ICU beds occupied with COVID-19 patients",
"Total available ICU beds",
"Total ventilators",
"Total ventilators being used by COVID-19 patients",
"Total ventilators being used by non-COVID-19 patients",
"Total available ventilators")
# table width responsive to length of var_defs text, so may not appear full.width
# use show_header_names to get col names being used by tbl_summary
tbl_summary(bvc,
missing = "ifany",
missing_text = "Missing") %>%
modify_header(update = list(
label ~ 'Variable')) %>%
modify_table_body(dplyr::mutate, defs = bvc_var_defs) %>%
modify_header(defs = "Definition") %>%
# show_header_names()
as_gt() %>%
tab_options(table.align = "left") %>%
cols_align("left", vars(stat_0, defs)) %>%
cols_width(vars(stat_0) ~ "150px") %>%
as_raw_html()
```
\
\
\
## Historical State Hospital Staff Shortages, Hospital Mortality Rate, Hospital Admissions and Ages Skewness of Admissions for Indiana
#### Description
Processed data for Hospitals [line charts](https://ercbk.github.io/Indiana-COVID-19-Website/hospitals.html#state-hospital-mortality-staffing-shortages-admissions) that shows state hospital staff shortages, hospital mortality rate, hospital admissions, and age skewness of hospital admissions towards older patients.
#### File name
hosp-msas-line.rds
#### Script
Process: [process-hospitals-data.R](https://github.com/ercbk/Indiana-COVID-19-Tracker/blob/master/R/process/process-hospitals-data.R)
#### Raw Sources
Regenstrief Institute: [dashboard](https://www.regenstrief.org/covid-dashboard/)
Department of Health and Human Services: [COVID-19 Reported Patient Impact and Hospital Capacity by State Timeseries](https://beta.healthdata.gov/Hospital/COVID-19-Reported-Patient-Impact-and-Hospital-Capa/g62h-syeh)
Department of Health and Human Services: [COVID-19 Reported Patient Impact and Hospital Capacity by Facility](https://beta.healthdata.gov/Hospital/COVID-19-Reported-Patient-Impact-and-Hospital-Capa/anag-cw7u)
#### Notes
Other variables:
- `date`: Ordered factor, Month Day format
\
```{r, asis=TRUE}
msas <- read_rds("data/hosp-msas-line.rds")
msas_var_defs <- c("Percent of reporting hospitals that have reported staffing shortages for that day. That percentage is averaged over a rolling, seven day window",
"Ratio of deaths of hospitalized COVID-19 patients and unique COVID-19 hospital admissions. Each rate is calculated over a rolling, 14-day window",
"Daily total of unique individuals that have tested positive for COVID-19 and been admitted to a hospital on the that day. Those daily counts are averaged over a rolling, seven day window",
"Measurement of the age makeup of the COVID-19 hospital admissions data. It's calculated over a rolling, 14 day window")
# table width responsive to length of var_defs text, so may not appear full.width
# use show_header_names to get col names being used by tbl_summary
tbl_summary(msas %>% select(-date),
missing = "ifany",
missing_text = "Missing") %>%
modify_header(update = list(
label ~ 'Variable')) %>%
modify_table_body(dplyr::mutate, defs = msas_var_defs) %>%
modify_header(defs = "Definition") %>%
# show_header_names()
as_gt() %>%
tab_options(table.align = "left") %>%
cols_align("left", vars(stat_0, defs)) %>%
cols_width(vars(stat_0) ~ px(150)) %>%
as_raw_html()
```
\
\
\
## Local Hospital Capacity for Indiana
#### Description
Processed data for the Hospitals [Local Hospital Capacity table](https://ercbk.github.io/Indiana-COVID-19-Website/hospitals.html#local-hospital-capacity) that shows capacity measures and counts of COVID-19 patients for hospitals at the local level.
#### File name
hosp-react-tab.rds
#### Script
Process: [process-hospitals-data.R](https://github.com/ercbk/Indiana-COVID-19-Tracker/blob/master/R/process/process-hospitals-data.R)
#### Raw Sources
Department of Health and Human Services: [COVID-19 Reported Patient Impact and Hospital Capacity by State Timeseries](https://beta.healthdata.gov/Hospital/COVID-19-Reported-Patient-Impact-and-Hospital-Capa/g62h-syeh)
#### Notes
Other variables:
- `end_date`: date, yyyy-mm-dd format, end date of week interval
- `hospital_name`: char, Name of hospital
- `address`: char, Street address of hospital
- `city_zip`: char, City and zip code
- `county_name`: char, Name of county
- `avgCovIceuTenKList`: nested list, `end_date` and average daily number of ICU beds being used by confirmed and suspected COVID-19 patients over the weekly interval
- `avgCovHospTenKList`: nested list, `end_date` and average daily number of hospital beds being used by confirmed and suspected COVID-19 patients over the weekly interval
- `avgTotImpBedsList`: `end_date` and average daily number of staffed total beds available over the weekly interval
\
```{r, asis=TRUE}
hrt <- read_rds("data/hosp-react-tab.rds")
hrt_var_defs <- c("Proportion of the seven-day average of occupied ICU beds to the seven-day average of available ICU beds.",
"",
"Proportion of the seven-day average of occupied hospital beds to the seven-day average of available hospital beds.",
"")
# table width responsive to length of var_defs text, so may not appear full.width
# use show_header_names to get col names being used by tbl_summary
tbl_summary(hrt %>% select(sev_day_icu_perc_occup, sev_day_hosp_perc_occup),
missing = "ifany",
missing_text = "Missing") %>%
modify_header(update = list(
label ~ 'Variable')) %>%
modify_table_body(dplyr::mutate, defs = hrt_var_defs) %>%
modify_header(defs = "Definition") %>%
# show_header_names()
as_gt() %>%
tab_options(table.align = "left") %>%
cols_align("left", vars(stat_0, defs)) %>%
cols_width(vars(stat_0) ~ px(150)) %>%
as_raw_html()
```
\
\
\
## Historical Daily Tests, Cases and Deaths by Age for Indiana
#### Description
Raw data for Demographics [line charts](https://ercbk.github.io/Indiana-COVID-19-Website/demographics.html) that shows daily case and death counts by age group.
#### File name
ind-age-complete.csv
#### Script
Collection: [build-datasets.R](https://github.com/ercbk/Indiana-COVID-19-Tracker/blob/master/R/collection/build-datasets.R)
#### Raw Sources
Indiana Data Hub: [COVID-19 CASE DEMOGRAPHICS](https://hub.mph.in.gov/dataset/covid-19-case-demographics)
#### Notes
The source publishs daily excel spreadsheets with total resource counts, and these spreadsheets are collected and joined daily to produce a dataset with historical values.
Other variables:
- `date`: date, yyyy-mm-dd format
\
```{r, asis=TRUE}
iac <- read_csv("data/ind-age-complete.csv")
iac_var_defs <- c("Age Group",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"Number of cases by age group",
"Number of deaths by age group",
"Number of tests by age group",
"Percent of daily cases",
"Percent of daily deaths",
"Percent of daily tests")
# table width responsive to length of var_defs text, so may not appear full.width
# use show_header_names to get col names being used by tbl_summary
tbl_summary(iac %>% select(-date),
missing = "ifany",
missing_text = "Missing") %>%
modify_header(update = list(
label ~ 'Variable')) %>%
modify_table_body(dplyr::mutate, defs = iac_var_defs) %>%
modify_header(defs = "Definition") %>%
# show_header_names()
as_gt() %>%
tab_options(table.align = "left") %>%
cols_align("left", vars(stat_0, defs)) %>%
cols_width(vars(stat_0) ~ px(190)) %>%
as_raw_html()
```
\
\
\
## Historical Daily Cases and Deaths by Race for Indiana
#### Description
Raw data that shows daily case and death counts by race.
#### File name
ind-race-complete.csv
#### Script
Collection: [build-datasets.R](https://github.com/ercbk/Indiana-COVID-19-Tracker/blob/master/R/collection/build-datasets.R)
#### Raw Sources
The Covid Tracking Project: [The COVID Racial Data Tracker](https://covidtracking.com/race)
#### Notes
The source publishs data every 3 or 4 days.
Other variables:
- `date`: date, yyyy-mm-dd format
There is a latin_x column for cases and deaths, but it's over 90% missing and only a few distinct values. A few columns have some TRUE/FALSE entries. I didn't investigate the reason behind these odd data entries.
There are also around 30 columns completely composed of missing values.
\
```{r, asis=TRUE}
irc <- read_csv("data/ind-race-complete.csv") %>%
select_if(~any(!is.na(.))) %>%
select_if(~is.numeric(.)) %>%
select(!matches("latin_x"))
# table width responsive to length of var_defs text, so may not appear full.width
# use show_header_names to get col names being used by tbl_summary
tbl_summary(irc,
missing = "ifany",
missing_text = "Missing") %>%
modify_header(update = list(
label ~ 'Variable')) %>%
as_gt() %>%
tab_options(table.align = "left") %>%
cols_align("left", vars(stat_0)) %>%
as_raw_html()
```
\
\
\
## Historical Weekly Median Age of Cases, Weekly Tests and Deaths for Indiana
#### Description
Processed data for the Demographics [bubble chart](https://ercbk.github.io/Indiana-COVID-19-Website/demographics.html#median-age-of-cases-tests-deaths) that shows the number of tests, number of deaths, and median age of the cases per week.
#### File name
median-age-bubble.rds
#### Script
Processing: [process-demog-data.R](https://github.com/ercbk/Indiana-COVID-19-Tracker/blob/master/R/process/process-demog-data.R)
#### Raw Sources
Indiana Data Hub: [COVID-19 CASE DATA](https://hub.mph.in.gov/dataset/covid-19-case-data)
#### Notes
Other variables:
- `end_date`: ordered factor, Month Day format; end date of weekly interval
\
```{r, asis=TRUE}
mab <- read_rds("data/median-age-bubble.rds")
mab_var_defs <- c("Median age of cases for that week",
"Number of tests for that week",
"Number of deaths for that week")
# table width responsive to length of var_defs text, so may not appear full.width
# use show_header_names to get col names being used by tbl_summary
tbl_summary(mab %>% select(-end_date),
missing = "ifany",
missing_text = "Missing") %>%
modify_header(update = list(
label ~ 'Variable')) %>%
modify_table_body(dplyr::mutate, defs = mab_var_defs) %>%
modify_header(defs = "Definition") %>%
# show_header_names()
as_gt() %>%
tab_options(table.align = "left") %>%
cols_align("left", vars(stat_0, defs)) %>%
cols_width(vars(stat_0) ~ px(200)) %>%
as_raw_html()
```
\
\
\
## Historical Daily Hospital Admissions and Deaths for Indiana
#### Description
Raw data for the Hospitals [line charts](https://ercbk.github.io/Indiana-COVID-19-Website/hospitals.html#state-hospital-mortality-staffing-shortages-admissions) that shows daily COVID-19 hospital admissions, hospital deaths, and hospital death rate.
#### File name
mort-hosp-line.rds
#### Script
Collection: [scrape-regenstrief-tableau.R](https://github.com/ercbk/Indiana-COVID-19-Tracker/blob/master/R/collection/scrape-regenstrief-tableau.R)
#### Raw Sources
Regenstrief Institute: [dashboard](https://www.regenstrief.org/covid-dashboard/)
#### Notes
This dataset is incomplete with random gaps between days.
Other variables:
- `date`: yyyy-mm-dd format
\
```{r, asis=TRUE}
mhl <- read_rds("data/mort-hosp-line.rds")
mhl_var_defs <- c("Number of individuals hospitalized for COVID-19 who died while in the hospital",
"Number of unique individuals who have been hospitalized and tested positive for COVID-19",
"Percent of individuals hospitalized for COVID-19 who died while in the hospital")
# table width responsive to length of var_defs text, so may not appear full.width
# use show_header_names to get col names being used by tbl_summary
tbl_summary(mhl %>% select(-date),
missing = "ifany",
missing_text = "Missing") %>%
modify_header(update = list(
label ~ 'Variable')) %>%
modify_table_body(dplyr::mutate, defs = mhl_var_defs) %>%
modify_header(defs = "Definition") %>%
# show_header_names()
as_gt() %>%
tab_options(table.align = "left") %>%
cols_align("left", vars(stat_0, defs)) %>%
cols_width(vars(stat_0) ~ "180px") %>%
as_raw_html()
```
\
\
\
## Historical Weekly Positivity Rates and Daily Cases per 100,000 Indiana Residents
#### Description
Processed data for the [Indiana COVIDcast Dashboard](https://ercbk.github.io/Indiana-COVIDcast-Dashboard/#dashboard) that shows weekly positivity rate and daily cases per 100,000 residents per metropolitan statistical area.
#### File name
msa-cases100-posrate-historic.csv
#### Scripts
Processing: [process-hist-regional-dat.R](https://github.com/ercbk/Indiana-COVIDcast-Dashboard/blob/master/R/process-hist-regional-dat.R)
#### Raw Sources
covidcast R package: [website](https://cmu-delphi.github.io/covidcast/covidcastR/)
Michigan Disease Surveillance System: [website](https://www.michigan.gov/coronavirus/0,9753,7-406-98163_98173---,00.html)
Wisconsin Department of Health Services: [website](https://data.dhsgis.wi.gov/datasets/covid-19-historical-data-by-county/data?orderBy=DATE&orderByAsc=false)
Illinois Department of Public Health: [website](http://www.dph.illinois.gov/countymetrics?county=Adams)
Indiana Data Hub: [website](https://hub.mph.in.gov/dataset?q=COVID)
#### Notes
The missing values for `pos_rate` are partly because this dataset has a row for every day and the positivity rate is calculated every week. The other missing values are for Cincinnati, Louisville, and Evansville. At the time this dashboard was created, those states with counties included in those areas didn't publicly release the necessary data to calcuate the positivity rates for those areas.
Other variables:
- `date`: yyyy-mm-dd format; date for daily `cases_100k`
- `geo_value`: FIPS codes for `msa`
- `start_date`: Start date of the weekly interval for `pos_rate`
- `data_date`: Date when data was last updated
\
```{r, asis=TRUE}
msa_hist <- read_csv("../Indiana-COVIDcast-Dashboard/data/msa-cases100-posrate-historic.csv")
msa_hist_var_defs <- purrr::reduce(list("Metropolitan Statistical Area",
rep("", 15),
"Daily cases per 100,000 residents per MSA",
"",
"Weekly positivity rate per MSA",
""), append)
# table width responsive to length of var_defs text, so may not appear full.width
# use show_header_names to get col names being used by tbl_summary
tbl_summary(msa_hist,
missing = "ifany",
missing_text = "Missing",
include = c(date, msa, cases_100k, pos_rate)) %>%
modify_header(update = list(
label ~ 'Variable')) %>%
modify_table_body(dplyr::mutate, defs = msa_hist_var_defs) %>%
modify_header(defs = "Definition") %>%
# show_header_names()
as_gt() %>%
tab_options(table.align = "left") %>%
cols_align("left", vars(stat_0, defs)) %>%
as_raw_html()
```
\
\
\
## Historical Daily Values of Delphi Research Groups Combined Indicator for Indiana
#### Description
Processed data for the [Indiana COVIDcast Dashboard](https://ercbk.github.io/Indiana-COVIDcast-Dashboard/#dashboard) that shows historic daily values of Delphi Research Group's Combined Indicator for each methropolitan statistical area.
#### File name
dash-ci-line.rds
#### Scripts
Processing: [process-dashboard-data.R](https://github.com/ercbk/Indiana-COVIDcast-Dashboard/blob/master/R/process-dashboard-data.R)
#### Raw Sources
covidcast R package: [website](https://cmu-delphi.github.io/covidcast/covidcastR/)
#### Notes
Other variables:
- `time_value`: yyyy-mm-dd format; Daily
\
```{r, asis=TRUE}
dcl <- read_rds("../Indiana-COVIDcast-Dashboard/data/dash-ci-line.rds") %>%
filter(name != "<<<<<<< HEAD" & name != "=======" & name != ">>>>>>> 113d96e638fcac35d736d138e77e8b5d47d9a407")
dcl_var_defs <- purrr::reduce(list("Metropolitan Statistical Area",
rep("", 15),
"Delphi Research Group's “Combined” indicator"), append)
# table width responsive to length of var_defs text, so may not appear full.width
# use show_header_names to get col names being used by tbl_summary
tbl_summary(dcl,
missing = "ifany",
missing_text = "Missing",
include = c(name, value)) %>%
modify_header(update = list(label ~ 'Variable')) %>%
modify_table_body(dplyr::mutate, defs = dcl_var_defs) %>%
modify_header(defs = "Definition") %>%
# show_header_names()
as_gt() %>%
tab_options(table.align = "left") %>%
cols_align("left", vars(stat_0, defs)) %>%
as_raw_html()
```
\
\
\
## Historical Weekly COVID-19 Statistics and Counts for Illinois Counties
#### Description
Raw data for the [Indiana COVIDcast Dashboard](https://ercbk.github.io/Indiana-COVIDcast-Dashboard/#dashboard) that shows various weekly COVID-19 county statistics for Illinois
#### File name
illinois-tests-complete.csv
#### Scripts
Collection: [build-regional-dat.R](https://github.com/ercbk/Indiana-COVIDcast-Dashboard/blob/master/R/build-regional-dat.R)
#### Raw Sources
Illinois Department of Public Health: [website](http://www.dph.illinois.gov/countymetrics?county=Adams)
#### Notes
These data are published in weekly intervals into a HTML table then scraped and collected.
Other variables:
- `week`: int; week of the year
- `start_date`: yyyy-mm-dd format; First day of the weekly interval
- `end_date`: yyyy-mm-dd formate; Last day of the weekly interval
- `County`: char; Illinois county name
- `New Cases per 100,000`: string; format: "\<int\> cases" or "\<int\> per 100k" or "\<int\> per 100kwarning"
- `Test Positivity %`: string; format: "\<float\>%\\r\\n New Tests: \<int\>"
- `(%) CLI ED Visits, Adults`: string; format: "\<int\>%"
- `ICU (%) Available`: string; format: "\<float\>%"
\
```{r, asis=TRUE}
ill <- read_csv("../Indiana-COVIDcast-Dashboard/data/states/illinois-tests-complete.csv")
ill_var_defs <- c("Number of COVID-19 deaths per week per county",
"")
# table width responsive to length of var_defs text, so may not appear full.width
# use show_header_names to get col names being used by tbl_summary
tbl_summary(ill,
missing = "ifany",
missing_text = "Missing",
include = c(`Number of Deaths`)) %>%
modify_header(update = list(label ~ 'Variable')) %>%
modify_table_body(dplyr::mutate, defs = ill_var_defs) %>%
modify_header(defs = "Definition") %>%
# show_header_names()
as_gt() %>%
tab_options(table.align = "left") %>%
cols_align("left", vars(stat_0, defs)) %>%
as_raw_html()
```
\
\
\
## Historical Daily COVID-19 Test Results for Indiana Counties
#### Description
Raw data for the [Indiana COVIDcast Dashboard](https://ercbk.github.io/Indiana-COVIDcast-Dashboard/#dashboard) that shows daily COVID-19 county test results for Indiana
#### File name
ind-tests-complete.csv
#### Scripts
Collection: [build-regional-dat.R](https://github.com/ercbk/Indiana-COVIDcast-Dashboard/blob/master/R/build-regional-dat.R)
#### Raw Sources
Indiana Data Hub: [COVID-19 COUNTY-WIDE TEST, CASE, AND DEATH TRENDS](https://hub.mph.in.gov/dataset/covid-19-county-wide-test-case-and-death-trends)
#### Notes
Other variables:
- `date`: yyyy-mm-dd format; Daily
- `county`: County name
\
```{r, asis=TRUE}
ind <- read_csv("../Indiana-COVIDcast-Dashboard/data/states/ind-tests-complete.csv")
ind_var_defs <- c("Number of COVID-19 cases per day per county",
"Number of COVID-19 tests per day per county")
# table width responsive to length of var_defs text, so may not appear full.width
# use show_header_names to get col names being used by tbl_summary
tbl_summary(ind,
missing = "ifany",
missing_text = "Missing",
include = c(positives, num_tests)) %>%
modify_header(update = list(label ~ 'Variable')) %>%
modify_table_body(dplyr::mutate, defs = ind_var_defs) %>%
modify_header(defs = "Definition") %>%
# show_header_names()
as_gt() %>%
tab_options(table.align = "left") %>%
cols_align("left", vars(stat_0, defs)) %>%
as_raw_html()
```
\
\
\
## Historical Daily COVID-19 Test Results for Michigan Counties
#### Description
Raw data for the [Indiana COVIDcast Dashboard](https://ercbk.github.io/Indiana-COVIDcast-Dashboard/#dashboard) that shows daily COVID-19 county test results for Michigan
#### File name
mich-tests-complete.csv
#### Scripts
Collection: [build-regional-dat.R](https://github.com/ercbk/Indiana-COVIDcast-Dashboard/blob/master/R/build-regional-dat.R)
#### Raw Sources
Michigan Department of Health and Human Services: [COVID-19 Tests by County](https://www.michigan.gov/coronavirus/0,9753,7-406-98163_98173---,00.html)
#### Notes
Other variables:
- `date`: yyyy-mm-dd format; Daily
- `county`: County name
\
```{r, asis=TRUE}
mich <- read_csv("../Indiana-COVIDcast-Dashboard/data/states/mich-tests-complete.csv")
mich_var_defs <- c("Number of COVID-19 positive tests per day per county",
"Number of COVID-19 negative tests per day per county",
"Total number of COVID-19 tests per day per county")
# table width responsive to length of var_defs text, so may not appear full.width
# use show_header_names to get col names being used by tbl_summary
tbl_summary(mich,
missing = "ifany",
missing_text = "Missing",
include = c(positive, negative, total)) %>%
modify_header(update = list(label ~ 'Variable')) %>%
modify_table_body(dplyr::mutate, defs = mich_var_defs) %>%
modify_header(defs = "Definition") %>%
# show_header_names()
as_gt() %>%
tab_options(table.align = "left") %>%
cols_align("left", vars(stat_0, defs)) %>%
as_raw_html()
```
\
\
\
## Historical Daily COVID-19 Test Results for Wisconsin Counties
#### Description
Raw data for the [Indiana COVIDcast Dashboard](https://ercbk.github.io/Indiana-COVIDcast-Dashboard/#dashboard) that shows daily COVID-19 county test results for Wisconsin
#### File name
wisc-tests-complete.csv
#### Scripts
Collection: [build-regional-dat.R](https://github.com/ercbk/Indiana-COVIDcast-Dashboard/blob/master/R/build-regional-dat.R)
#### Raw Sources
Wisconsin Department of Health Services: [COVID-19 Historical Data by County](https://data.dhsgis.wi.gov/datasets/covid-19-historical-data-by-county/data?orderBy=DATE&orderByAsc=false)
#### Notes
Other variables:
- `date`: yyyy-mm-dd format; Daily
- `county`: County name
\
```{r, asis=TRUE}
wisc <- read_csv("../Indiana-COVIDcast-Dashboard/data/states/wisc-tests-complete.csv")
wisc_var_defs <- c("Number of COVID-19 positive tests per day per county",
"Number of COVID-19 negative tests per day per county",
"")
# table width responsive to length of var_defs text, so may not appear full.width
# use show_header_names to get col names being used by tbl_summary
tbl_summary(wisc,
missing = "ifany",
missing_text = "Missing",
include = c(positive, negative)) %>%
modify_header(update = list(label ~ 'Variable')) %>%
modify_table_body(dplyr::mutate, defs = wisc_var_defs) %>%
modify_header(defs = "Definition") %>%
# show_header_names()
as_gt() %>%
tab_options(table.align = "left") %>%
cols_align("left", vars(stat_0, defs)) %>%
as_raw_html()
```
\
\
\