Skip to content

Commit 7fd5580

Browse files
committed
fix+doc: regenerate jhu_csse_daily_subset and update doc
1 parent 96518ad commit 7fd5580

File tree

3 files changed

+25
-25
lines changed

3 files changed

+25
-25
lines changed

R/data.R

+9-9
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828
#' in Engineering. Copyright Johns Hopkins University 2020.
2929
#'
3030
#' Modifications:
31-
#' * \href{https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/jhu-csse.html}{From the COVIDcast Epidata API}:
32-
#' These signals are taken directly from the JHU CSSE
33-
#' \href{https://github.com/CSSEGISandData/COVID-19}{COVID-19 GitHub repository}
34-
#' without changes. The 7-day average signals are computed by Delphi by
35-
#' calculating moving averages of the preceding 7 days, so the signal for
36-
#' June 7 is the average of the underlying data for June 1 through 7,
37-
#' inclusive.
38-
#' * Furthermore, the data has been limited to a very small number of rows,
39-
#' the signal names slightly altered, and formatted into a tibble.
31+
#' * \href{https://cmu-delphi.github.io/delphi-epidata/api/covidcast-signals/jhu-csse.html}{From
32+
#' the COVIDcast Epidata API}: The case signal is taken directly from the JHU
33+
#' CSSE \href{https://github.com/CSSEGISandData/COVID-19}{COVID-19 GitHub
34+
#' repository}. The rate signals were computed by Delphi using Census
35+
#' population data. The 7-day average signals were computed by Delphi by
36+
#' calculating moving averages of the preceding 7 days, so the signal for June
37+
#' 7 is the average of the underlying data for June 1 through 7, inclusive.
38+
#' * Furthermore, the data has been limited to a very small number of rows, the
39+
#' signal names slightly altered, and formatted into a tibble.
4040
"jhu_csse_daily_subset"
4141

4242

data-raw/jhu_csse_daily_subset.R

+16-16
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,58 @@ library(epidatr)
22
library(epiprocess)
33
library(dplyr)
44

5-
confirmed_7dav_incidence_prop <- pub_covidcast(
5+
confirmed_incidence_num <- pub_covidcast(
66
source = "jhu-csse",
7-
signals = "confirmed_7dav_incidence_prop",
7+
signals = "confirmed_incidence_num",
88
geo_type = "state",
99
time_type = "day",
1010
geo_values = "ca,fl,ny,tx,ga,pa",
1111
time_values = epirange(20200301, 20211231),
1212
) %>%
13-
select(geo_value, time_value, case_rate_7d_av = value) %>%
13+
select(geo_value, time_value, cases = value) %>%
1414
arrange(geo_value, time_value)
1515

16-
deaths_7dav_incidence_prop <- pub_covidcast(
16+
confirmed_7dav_incidence_num <- pub_covidcast(
1717
source = "jhu-csse",
18-
signals = "deaths_7dav_incidence_prop",
18+
signals = "confirmed_7dav_incidence_num",
1919
geo_type = "state",
2020
time_type = "day",
2121
geo_values = "ca,fl,ny,tx,ga,pa",
2222
time_values = epirange(20200301, 20211231),
2323
) %>%
24-
select(geo_value, time_value, death_rate_7d_av = value) %>%
24+
select(geo_value, time_value, cases_7d_av = value) %>%
2525
arrange(geo_value, time_value)
2626

27-
confirmed_incidence_num <- pub_covidcast(
27+
confirmed_7dav_incidence_prop <- pub_covidcast(
2828
source = "jhu-csse",
29-
signals = "confirmed_incidence_num",
29+
signals = "confirmed_7dav_incidence_prop",
3030
geo_type = "state",
3131
time_type = "day",
3232
geo_values = "ca,fl,ny,tx,ga,pa",
3333
time_values = epirange(20200301, 20211231),
3434
) %>%
35-
select(geo_value, time_value, cases = value) %>%
35+
select(geo_value, time_value, case_rate_7d_av = value) %>%
3636
arrange(geo_value, time_value)
3737

38-
confirmed_7dav_incidence_num <- pub_covidcast(
38+
deaths_7dav_incidence_prop <- pub_covidcast(
3939
source = "jhu-csse",
40-
signals = "confirmed_7dav_incidence_num",
40+
signals = "deaths_7dav_incidence_prop",
4141
geo_type = "state",
4242
time_type = "day",
4343
geo_values = "ca,fl,ny,tx,ga,pa",
4444
time_values = epirange(20200301, 20211231),
4545
) %>%
46-
select(geo_value, time_value, cases_7d_av = value) %>%
46+
select(geo_value, time_value, death_rate_7d_av = value) %>%
4747
arrange(geo_value, time_value)
4848

49-
jhu_csse_daily_subset <- confirmed_7dav_incidence_prop %>%
50-
full_join(deaths_7dav_incidence_prop,
49+
jhu_csse_daily_subset <- confirmed_incidence_num %>%
50+
full_join(confirmed_7dav_incidence_num,
5151
by = c("geo_value", "time_value")
5252
) %>%
53-
full_join(confirmed_incidence_num,
53+
full_join(confirmed_7dav_incidence_prop,
5454
by = c("geo_value", "time_value")
5555
) %>%
56-
full_join(confirmed_7dav_incidence_num,
56+
full_join(deaths_7dav_incidence_prop,
5757
by = c("geo_value", "time_value")
5858
) %>%
5959
as_epi_df()

data/jhu_csse_daily_subset.rda

-931 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)