File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,8 @@ Imports:
5252 tidybayes,
5353 optparse,
5454 Microsoft365R,
55- stringr
55+ stringr,
56+ glue
5657Additional_repositories:
5758 https://stan-dev.r-universe.dev
5859URL: https://cdcgov.github.io/cfa-epinow2-pipeline/
Original file line number Diff line number Diff 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 "
You can’t perform that action at this time.
0 commit comments