Skip to content

Commit 4a1dcd1

Browse files
pre commit and updating glue in DESCRIPTION file
1 parent bde607a commit 4a1dcd1

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ Imports:
5252
tidybayes,
5353
optparse,
5454
Microsoft365R,
55-
stringr
55+
stringr,
56+
glue
5657
Additional_repositories:
5758
https://stan-dev.r-universe.dev
5859
URL: https://cdcgov.github.io/cfa-epinow2-pipeline/

R/read_data.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,17 @@ read_data <- function(
3030
report_date,
3131
max_reference_date,
3232
min_reference_date,
33-
facility_active_proportion
33+
facility_active_proportion = 0.94
3434
) {
3535
rlang::arg_match(disease)
3636
check_file_exists(data_path)
3737

3838
con <- DBI::dbConnect(duckdb::duckdb())
3939
on.exit(DBI::dbDisconnect(con), add = TRUE)
4040

41+
# any_visits_this_day is calculated for API v2
42+
# True if a given facility, on a given reference_date had a DDI count > 0
43+
# Same across all diseases and metrics for (facility, reference_date)
4144
is_api_v2 <- rlang::try_fetch(
4245
{
4346
cols <- DBI::dbGetQuery(
@@ -153,6 +156,8 @@ read_data <- function(
153156
SUM(value) AS confirm
154157
FROM facility_checks
155158
WHERE proportion_true >= ?
159+
-- `WHERE` filters before the GROUP BY, so this filter excludes
160+
-- from the agg all facilities with insufficient reporting
156161
{group_by}
157162
ORDER BY reference_date
158163
"

0 commit comments

Comments
 (0)