@@ -63,24 +63,22 @@ regression, the textbook example for modeling count data, as an illustration
63
63
for using the ` epipredict ` package with other existing tidymodels packages.
64
64
65
65
``` {r poisson-reg-data}
66
- x <- covidcast (
66
+ x <- pub_covidcast (
67
67
source = "jhu-csse",
68
68
signals = "confirmed_incidence_num",
69
69
time_type = "day",
70
70
geo_type = "state",
71
71
time_values = epirange(20210604, 20211231),
72
72
geo_values = "ca,fl,tx,ny,nj") %>%
73
- fetch() %>%
74
73
select(geo_value, time_value, cases = value)
75
74
76
- y <- covidcast (
75
+ y <- pub_covidcast (
77
76
source = "jhu-csse",
78
77
signals = "deaths_incidence_num",
79
78
time_type = "day",
80
79
geo_type = "state",
81
80
time_values = epirange(20210604, 20211231),
82
81
geo_values = "ca,fl,tx,ny,nj") %>%
83
- fetch() %>%
84
82
select(geo_value, time_value, deaths = value)
85
83
86
84
counts_subset <- full_join(x, y, by = c("geo_value", "time_value")) %>%
@@ -244,24 +242,22 @@ in public in the past 7 days maintained a distance of at least 6 feet.
244
242
State-wise population data from the 2019 U.S. Census is included in this package
245
243
and will be used in ` layer_population_scaling() ` .
246
244
``` {r}
247
- behav_ind_mask <- covidcast (
245
+ behav_ind_mask <- pub_covidcast (
248
246
source = "fb-survey",
249
247
signals = "smoothed_wwearing_mask_7d",
250
248
time_type = "day",
251
249
geo_type = "state",
252
250
time_values = epirange(20210604, 20211231),
253
251
geo_values = "ca,fl,tx,ny,nj") %>%
254
- fetch() %>%
255
252
select(geo_value, time_value, masking = value)
256
253
257
- behav_ind_distancing <- covidcast (
254
+ behav_ind_distancing <- pub_covidcast (
258
255
source = "fb-survey",
259
256
signals = "smoothed_wothers_distanced_public",
260
257
time_type = "day",
261
258
geo_type = "state",
262
259
time_values = epirange(20210604, 20211231),
263
260
geo_values = "ca,fl,tx,ny,nj") %>%
264
- fetch() %>%
265
261
select(geo_value, time_value, distancing = value)
266
262
267
263
pop_dat <- state_census %>% select(abbr, pop)
0 commit comments