Skip to content

Commit 79867a2

Browse files
committed
rename datasets from _dt to _tbl within data-generation scripts
This also accompanies commit e87ec28
1 parent b80ac35 commit 79867a2

12 files changed

+41
-41
lines changed

data-raw/archive_cases_dv_subset_all_states_tbl.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ case_rate_subset <- pub_covidcast(
3535

3636
# Use `epiprocess::epix_merge` to avoid having to reimplement `sync`ing
3737
# behavior. After merging, convert DT component back to tibble.
38-
archive_cases_dv_subset_all_states_dt = epix_merge(
38+
archive_cases_dv_subset_all_states_tbl = epix_merge(
3939
dv_subset, case_rate_subset,
4040
sync = "locf",
4141
compactify = TRUE)$DT %>%
4242
as_tibble()
4343

4444
# We're trying to do:
45-
# usethis::use_data(archive_cases_dv_subset_all_states_dt, internal = TRUE, overwrite = TRUE, compress = "xz")
45+
# usethis::use_data(archive_cases_dv_subset_all_states_tbl, internal = TRUE, overwrite = TRUE, compress = "xz")
4646
# but `usethis::use_data` can only store multiple objects if they're added in
4747
# the same call. This workaround is from
4848
# https://github.com/r-lib/usethis/issues/1512
49-
save_to_sysdata(archive_cases_dv_subset_all_states_dt, "archive_cases_dv_subset_all_states_dt")
49+
save_to_sysdata(archive_cases_dv_subset_all_states_tbl, "archive_cases_dv_subset_all_states_tbl")

data-raw/archive_cases_dv_subset_tbl.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ case_rate_subset <- pub_covidcast(
3232

3333
# Use `epiprocess::epix_merge` to avoid having to reimplement `sync`ing
3434
# behavior. After merging, convert DT component back to tibble.
35-
archive_cases_dv_subset_dt = epix_merge(
35+
archive_cases_dv_subset_tbl = epix_merge(
3636
dv_subset, case_rate_subset,
3737
sync = "locf",
3838
compactify = FALSE)$DT %>%
3939
as_tibble()
4040

4141
# We're trying to do:
42-
# usethis::use_data(archive_cases_dv_subset_dt, internal = TRUE, overwrite = TRUE, compress = "xz")
42+
# usethis::use_data(archive_cases_dv_subset_tbl, internal = TRUE, overwrite = TRUE, compress = "xz")
4343
# but `usethis::use_data` can only store multiple objects if they're added in
4444
# the same call. This workaround is from
4545
# https://github.com/r-lib/usethis/issues/1512
46-
save_to_sysdata(archive_cases_dv_subset_dt, "archive_cases_dv_subset_dt")
46+
save_to_sysdata(archive_cases_dv_subset_tbl, "archive_cases_dv_subset_tbl")

data-raw/can_prov_cases_tbl.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## code to prepare `can_prov_cases_dt` dataset goes here
1+
## code to prepare `can_prov_cases_tbl` dataset goes here
22

33
library(dplyr)
44
library(readr)
@@ -108,7 +108,7 @@ ca_pop <- read_csv(
108108
abbrev_map <- setNames(ca_pop$province, ca_pop$abbreviation)
109109

110110
# Read in data
111-
can_prov_cases_dt <- purrr::map2(commit_pages$data_url, commit_pages$date, function(url, date) {
111+
can_prov_cases_tbl <- purrr::map2(commit_pages$data_url, commit_pages$date, function(url, date) {
112112
raw <- readr::read_csv(
113113
url,
114114
col_types = cols(
@@ -140,15 +140,15 @@ can_prov_cases_dt <- purrr::map2(commit_pages$data_url, commit_pages$date, funct
140140
return(result)
141141
})
142142

143-
names(can_prov_cases_dt) <- commit_pages$date
144-
can_prov_cases_dt <- can_prov_cases_dt %>% bind_rows(.id = "version") %>%
143+
names(can_prov_cases_tbl) <- commit_pages$date
144+
can_prov_cases_tbl <- can_prov_cases_tbl %>% bind_rows(.id = "version") %>%
145145
mutate(version = lubridate::ymd(version)) %>%
146146
arrange(version) %>%
147147
as_tibble()
148148

149149
# We're trying to do:
150-
# usethis::use_data(can_prov_cases_dt, internal = TRUE, overwrite = TRUE, compress = "xz")
150+
# usethis::use_data(can_prov_cases_tbl, internal = TRUE, overwrite = TRUE, compress = "xz")
151151
# but `usethis::use_data` can only store multiple objects if they're added in
152152
# the same call. This workaround is from
153153
# https://github.com/r-lib/usethis/issues/1512
154-
save_to_sysdata(can_prov_cases_dt, "can_prov_cases_dt")
154+
save_to_sysdata(can_prov_cases_tbl, "can_prov_cases_tbl")

data-raw/case_death_rate_archive_tbl.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ deaths_incidence_prop <- pub_covidcast(
3939

4040
# Use `epiprocess::epix_merge` to avoid having to reimplement `sync`ing
4141
# behavior.
42-
case_death_rate_archive_dt <- epix_merge(
42+
case_death_rate_archive_tbl <- epix_merge(
4343
confirmed_incidence_prop, deaths_incidence_prop,
4444
sync = "locf"
4545
)
4646

4747
# Calculate 7-day averages for case and death rates.
48-
case_death_rate_archive_dt <- case_death_rate_archive_dt %>%
48+
case_death_rate_archive_tbl <- case_death_rate_archive_tbl %>%
4949
epix_slide(
5050
before = 365000L, ref_time_values = fc_time_values,
5151
function(x, gk, rtv) {
@@ -69,12 +69,12 @@ case_death_rate_archive_dt <- case_death_rate_archive_dt %>%
6969
) %>%
7070
as_epi_archive(compactify = TRUE)
7171
# Convert DT component back to tibble.
72-
case_death_rate_archive_dt <- case_death_rate_archive_dt$DT %>%
72+
case_death_rate_archive_tbl <- case_death_rate_archive_tbl$DT %>%
7373
as_tibble()
7474

7575
# We're trying to do:
76-
# usethis::use_data(case_death_rate_archive_dt, internal = TRUE, overwrite = TRUE, compress = "xz")
76+
# usethis::use_data(case_death_rate_archive_tbl, internal = TRUE, overwrite = TRUE, compress = "xz")
7777
# but `usethis::use_data` can only store multiple objects if they're added in
7878
# the same call. This workaround is from
7979
# https://github.com/r-lib/usethis/issues/1512
80-
save_to_sysdata(case_death_rate_archive_dt, "case_death_rate_archive_dt")
80+
save_to_sysdata(case_death_rate_archive_tbl, "case_death_rate_archive_tbl")

data-raw/cases_deaths_subset_tbl.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ confirmed_7dav_incidence_num <- pub_covidcast(
5353
select(geo_value, time_value, cases_7d_av = value) %>%
5454
arrange(geo_value, time_value)
5555

56-
cases_deaths_subset_dt <- confirmed_7dav_incidence_prop %>%
56+
cases_deaths_subset_tbl <- confirmed_7dav_incidence_prop %>%
5757
full_join(deaths_7dav_incidence_prop,
5858
by = c("geo_value", "time_value")) %>%
5959
full_join(confirmed_incidence_num,
@@ -63,8 +63,8 @@ cases_deaths_subset_dt <- confirmed_7dav_incidence_prop %>%
6363
as_tibble()
6464

6565
# We're trying to do:
66-
# usethis::use_data(cases_deaths_subset_dt, internal = TRUE, overwrite = TRUE, compress = "xz")
66+
# usethis::use_data(cases_deaths_subset_tbl, internal = TRUE, overwrite = TRUE, compress = "xz")
6767
# but `usethis::use_data` can only store multiple objects if they're added in
6868
# the same call. This workaround is from
6969
# https://github.com/r-lib/usethis/issues/1512
70-
save_to_sysdata(cases_deaths_subset_dt, "cases_deaths_subset_dt")
70+
save_to_sysdata(cases_deaths_subset_tbl, "cases_deaths_subset_tbl")

data-raw/counts_subset_tbl.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ y <- pub_covidcast(
2727
) %>%
2828
select(geo_value, time_value, deaths = value)
2929

30-
counts_subset_dt <- full_join(x, y, by = c("geo_value", "time_value")) %>%
30+
counts_subset_tbl <- full_join(x, y, by = c("geo_value", "time_value")) %>%
3131
as_tibble()
3232

3333
# We're trying to do:
34-
# usethis::use_data(counts_subset_dt, internal = TRUE, overwrite = TRUE, compress = "xz")
34+
# usethis::use_data(counts_subset_tbl, internal = TRUE, overwrite = TRUE, compress = "xz")
3535
# but `usethis::use_data` can only store multiple objects if they're added in
3636
# the same call. This workaround is from
3737
# https://github.com/r-lib/usethis/issues/1512
38-
save_to_sysdata(counts_subset_dt, "counts_subset_dt")
38+
save_to_sysdata(counts_subset_tbl, "counts_subset_tbl")

data-raw/county_smoothed_cli_comparison_tbl.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ geo_values_complete <- intersect(
7575
)
7676

7777
# Join the three data frames together
78-
county_smoothed_cli_comparison_dt <- full_join(
78+
county_smoothed_cli_comparison_tbl <- full_join(
7979
full_join(goog_sm_cli, fb_survey, by = c("geo_value", "time_value")),
8080
jhu_7dav_incid,
8181
by = c("geo_value", "time_value")
@@ -84,8 +84,8 @@ county_smoothed_cli_comparison_dt <- full_join(
8484
as_tibble()
8585

8686
# We're trying to do:
87-
# usethis::use_data(county_smoothed_cli_comparison_dt, internal = TRUE, overwrite = TRUE, compress = "xz")
87+
# usethis::use_data(county_smoothed_cli_comparison_tbl, internal = TRUE, overwrite = TRUE, compress = "xz")
8888
# but `usethis::use_data` can only store multiple objects if they're added in
8989
# the same call. This workaround is from
9090
# https://github.com/r-lib/usethis/issues/1512
91-
save_to_sysdata(county_smoothed_cli_comparison_dt, "county_smoothed_cli_comparison_dt")
91+
save_to_sysdata(county_smoothed_cli_comparison_tbl, "county_smoothed_cli_comparison_tbl")

data-raw/covid_case_death_rates_tbl.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ y <- pub_covidcast(
2727
) %>%
2828
select(geo_value, time_value, death_rate = value)
2929

30-
covid_case_death_rates_dt <- x %>%
30+
covid_case_death_rates_tbl <- x %>%
3131
full_join(y, by = c("geo_value", "time_value")) %>%
3232
as_tibble()
3333

3434
# We're trying to do:
35-
# usethis::use_data(covid_case_death_rates_dt, internal = TRUE, overwrite = TRUE, compress = "xz")
35+
# usethis::use_data(covid_case_death_rates_tbl, internal = TRUE, overwrite = TRUE, compress = "xz")
3636
# but `usethis::use_data` can only store multiple objects if they're added in
3737
# the same call. This workaround is from
3838
# https://github.com/r-lib/usethis/issues/1512
39-
save_to_sysdata(covid_case_death_rates_dt, "covid_case_death_rates_dt")
39+
save_to_sysdata(covid_case_death_rates_tbl, "covid_case_death_rates_tbl")

data-raw/covid_incidence_county_subset_tbl.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ y <- covidcast::county_census %>%
1212
select(geo_value = FIPS, county_name = CTYNAME, state_name = STNAME)
1313

1414
# Fetch only counties from Massachusetts and Vermont, then append names columns as well
15-
covid_incidence_county_subset_dt <- pub_covidcast(
15+
covid_incidence_county_subset_tbl <- pub_covidcast(
1616
source = "jhu-csse",
1717
signals = "confirmed_incidence_num",
1818
time_type = "day",
@@ -26,8 +26,8 @@ covid_incidence_county_subset_dt <- pub_covidcast(
2626
as_tibble()
2727

2828
# We're trying to do:
29-
# usethis::use_data(covid_incidence_county_subset_dt, internal = TRUE, overwrite = TRUE, compress = "xz")
29+
# usethis::use_data(covid_incidence_county_subset_tbl, internal = TRUE, overwrite = TRUE, compress = "xz")
3030
# but `usethis::use_data` can only store multiple objects if they're added in
3131
# the same call. This workaround is from
3232
# https://github.com/r-lib/usethis/issues/1512
33-
save_to_sysdata(covid_incidence_county_subset_dt, "covid_incidence_county_subset_dt")
33+
save_to_sysdata(covid_incidence_county_subset_tbl, "covid_incidence_county_subset_tbl")

data-raw/covid_incidence_outliers_tbl.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source(here::here("data-raw/_helper.R"))
55

66
d <- as.Date("2021-10-28")
77

8-
covid_incidence_outliers_dt <- pub_covidcast(
8+
covid_incidence_outliers_tbl <- pub_covidcast(
99
source = "jhu-csse",
1010
signals = "confirmed_incidence_num",
1111
time_type = "day",
@@ -18,8 +18,8 @@ covid_incidence_outliers_dt <- pub_covidcast(
1818
as_tibble()
1919

2020
# We're trying to do:
21-
# usethis::use_data(covid_incidence_outliers_dt, internal = TRUE, overwrite = TRUE, compress = "xz")
21+
# usethis::use_data(covid_incidence_outliers_tbl, internal = TRUE, overwrite = TRUE, compress = "xz")
2222
# but `usethis::use_data` can only store multiple objects if they're added in
2323
# the same call. This workaround is from
2424
# https://github.com/r-lib/usethis/issues/1512
25-
save_to_sysdata(covid_incidence_outliers_dt, "covid_incidence_outliers_dt")
25+
save_to_sysdata(covid_incidence_outliers_tbl, "covid_incidence_outliers_tbl")

0 commit comments

Comments
 (0)