Skip to content

Commit 60909fb

Browse files
authored
Merge pull request #239 from cmu-delphi/release/6.0.0
Release 6.0.0
2 parents ff282c7 + 208e54e commit 60909fb

File tree

6 files changed

+250
-125
lines changed

6 files changed

+250
-125
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 5.0.1
2+
current_version = 6.0.0
33
commit = False
44
tag = False
55

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: forecasteval
22
Title: Forecast Evaluation Dashboard
3-
Version: 5.0.1
3+
Version: 6.0.0
44
Authors@R: c(person("Kate", "Harwood", email = "[email protected]", role = "cre"),
55
person("Chris", "Scott", role = "ctb"),
66
person("Jed", "Grabman", role = "ctb"))

app/R/data.R

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,13 @@ getAllData <- function(loadFile) {
8484
covCols
8585
)
8686

87-
dfStateCases <- dfStateCases %>% select(all_of(expectedCols))
88-
dfStateDeaths <- dfStateDeaths %>% select(all_of(expectedCols))
89-
dfStateHospitalizations <- dfStateHospitalizations %>% select(all_of(expectedCols))
90-
dfNationCases <- dfNationCases %>% select(all_of(expectedCols))
91-
dfNationDeaths <- dfNationDeaths %>% select(all_of(expectedCols))
92-
dfNationHospitalizations <- dfNationHospitalizations %>% select(all_of(expectedCols))
93-
94-
df <- rbind(
95-
dfStateCases, dfStateDeaths, dfStateHospitalizations,
96-
dfNationCases, dfNationDeaths, dfNationHospitalizations
87+
df <- bind_rows(
88+
dfStateCases %>% select(all_of(expectedCols)),
89+
dfStateDeaths %>% select(all_of(expectedCols)),
90+
dfStateHospitalizations %>% select(all_of(expectedCols)),
91+
dfNationCases %>% select(all_of(expectedCols)),
92+
dfNationDeaths %>% select(all_of(expectedCols)),
93+
dfNationHospitalizations %>% select(all_of(expectedCols))
9794
)
9895
df <- df %>% rename(
9996
"10" = cov_10, "20" = cov_20, "30" = cov_30,

app/R/data_manipulation.R

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,31 @@ filterHospitalizationsAheads <- function(scoreDf) {
6666
group_by(target_end_date, forecaster) %>%
6767
filter(ahead == min(ahead)) %>%
6868
mutate(ahead = HOSPITALIZATIONS_AHEAD_OPTIONS[1])
69-
twoAheadDf <- scoreDf %>%
70-
filter(ahead >= 7 + HOSPITALIZATIONS_OFFSET) %>%
71-
filter(ahead < 14 + HOSPITALIZATIONS_OFFSET) %>%
72-
group_by(target_end_date, forecaster) %>%
73-
filter(ahead == min(ahead)) %>%
74-
mutate(ahead = HOSPITALIZATIONS_AHEAD_OPTIONS[2])
75-
threeAheadDf <- scoreDf %>%
76-
filter(ahead >= 14 + HOSPITALIZATIONS_OFFSET) %>%
77-
filter(ahead < 21 + HOSPITALIZATIONS_OFFSET) %>%
78-
group_by(target_end_date, forecaster) %>%
79-
filter(ahead == min(ahead)) %>%
80-
mutate(ahead = HOSPITALIZATIONS_AHEAD_OPTIONS[3])
81-
fourAheadDf <- scoreDf %>%
82-
filter(ahead >= 21 + HOSPITALIZATIONS_OFFSET) %>%
83-
filter(ahead < 28 + HOSPITALIZATIONS_OFFSET) %>%
84-
group_by(target_end_date, forecaster) %>%
85-
filter(ahead == min(ahead)) %>%
86-
mutate(ahead = HOSPITALIZATIONS_AHEAD_OPTIONS[4])
8769

88-
return(rbind(oneAheadDf, twoAheadDf, threeAheadDf, fourAheadDf))
70+
return(bind_rows(
71+
scoreDf %>%
72+
filter(ahead >= HOSPITALIZATIONS_OFFSET) %>%
73+
filter(ahead < 7 + HOSPITALIZATIONS_OFFSET) %>%
74+
group_by(target_end_date, forecaster) %>%
75+
filter(ahead == min(ahead)) %>%
76+
mutate(ahead = HOSPITALIZATIONS_AHEAD_OPTIONS[1]),
77+
scoreDf %>%
78+
filter(ahead >= 7 + HOSPITALIZATIONS_OFFSET) %>%
79+
filter(ahead < 14 + HOSPITALIZATIONS_OFFSET) %>%
80+
group_by(target_end_date, forecaster) %>%
81+
filter(ahead == min(ahead)) %>%
82+
mutate(ahead = HOSPITALIZATIONS_AHEAD_OPTIONS[2]),
83+
scoreDf %>%
84+
filter(ahead >= 14 + HOSPITALIZATIONS_OFFSET) %>%
85+
filter(ahead < 21 + HOSPITALIZATIONS_OFFSET) %>%
86+
group_by(target_end_date, forecaster) %>%
87+
filter(ahead == min(ahead)) %>%
88+
mutate(ahead = HOSPITALIZATIONS_AHEAD_OPTIONS[3]),
89+
scoreDf %>%
90+
filter(ahead >= 21 + HOSPITALIZATIONS_OFFSET) %>%
91+
filter(ahead < 28 + HOSPITALIZATIONS_OFFSET) %>%
92+
group_by(target_end_date, forecaster) %>%
93+
filter(ahead == min(ahead)) %>%
94+
mutate(ahead = HOSPITALIZATIONS_AHEAD_OPTIONS[4])
95+
))
8996
}

app/global.R

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ library(viridis)
88
library(tsibble)
99
library(covidcast)
1010

11-
appVersion <- "5.0.1"
11+
appVersion <- "6.0.0"
1212

1313
COVERAGE_INTERVALS <- c("10", "20", "30", "40", "50", "60", "70", "80", "90", "95", "98")
1414
DEATH_FILTER <- "deaths_incidence_num"
@@ -29,6 +29,16 @@ HOSPITALIZATIONS_AHEAD_OPTIONS <- c(
2929
HOSPITALIZATIONS_OFFSET + 14, HOSPITALIZATIONS_OFFSET + 21
3030
)
3131

32+
# Sets the previous target to be the same as the first one, Deaths
33+
PREV_TARGET <- "Deaths"
34+
35+
# When RE_RENDER_TRUTH = TRUE
36+
# summaryPlot will be called only to update TruthPlot
37+
RE_RENDER_TRUTH <- FALSE
38+
39+
# USE_CURR_TRUTH indicates when we can use the previous TruthPlot
40+
USE_CURR_TRUTH <- FALSE
41+
3242
# Earliest 'as of' date available from covidcast API
3343
MIN_AVAIL_NATION_AS_OF_DATE <- as.Date("2020-04-02")
3444
MIN_AVAIL_HOSP_AS_OF_DATE <- as.Date("2020-11-16")

0 commit comments

Comments
 (0)