From db86563d8e2de576646970c8a78726a822f38c32 Mon Sep 17 00:00:00 2001 From: Mike O'Brien Date: Fri, 19 Mar 2021 16:21:18 -0400 Subject: [PATCH] validation params for safegraph --- .../templates/safegraph-params-prod.json.j2 | 28 +++++++++++++++++-- safegraph/params.json.template | 28 +++++++++++++++++-- safegraph/run-safegraph.sh | 1 + 3 files changed, 53 insertions(+), 4 deletions(-) diff --git a/ansible/templates/safegraph-params-prod.json.j2 b/ansible/templates/safegraph-params-prod.json.j2 index 41550a8ae..4fc9d4785 100644 --- a/ansible/templates/safegraph-params-prod.json.j2 +++ b/ansible/templates/safegraph-params-prod.json.j2 @@ -14,7 +14,31 @@ "sync": true, "wip_signal" : [] }, - "archive": { - "cache_dir": "./cache" + "validation": { + "common": { + "data_source": "safegraph", + "span_length": 14, + "end_date": "today", + "suppressed_errors": [ + {"signal": "bars_visit_num"}, + {"signal": "bars_visit_prop"}, + {"signal": "restaurants_visit_num"}, + {"signal": "restaurants_visit_prop"} + ] + }, + "static": { + "minimum_sample_size": 100, + "missing_se_allowed": false, + "missing_sample_size_allowed": false + }, + "dynamic": { + "ref_window_size": 7, + "smoothed_signals": [ + "completely_home_prop_7dav", + "full_time_work_prop_7dav", + "part_time_work_prop_7dav", + "median_home_dwell_time_7dav" + ] + } } } diff --git a/safegraph/params.json.template b/safegraph/params.json.template index 0c830c41c..3649cacbd 100644 --- a/safegraph/params.json.template +++ b/safegraph/params.json.template @@ -17,7 +17,31 @@ "part_time_work_prop_7dav", "full_time_work_prop_7dav"] }, - "archive": { - "cache_dir": "./cache" + "validation": { + "common": { + "data_source": "safegraph", + "span_length": 14, + "end_date": "today", + "suppressed_errors": [ + {"signal": "bars_visit_num"}, + {"signal": "bars_visit_prop"}, + {"signal": "restaurants_visit_num"}, + {"signal": "restaurants_visit_prop"} + ] + }, + "static": { + "minimum_sample_size": 100, + "missing_se_allowed": false, + "missing_sample_size_allowed": false + }, + "dynamic": { + "ref_window_size": 7, + "smoothed_signals": [ + "completely_home_prop_7dav", + "full_time_work_prop_7dav", + "part_time_work_prop_7dav", + "median_home_dwell_time_7dav" + ] + } } } diff --git a/safegraph/run-safegraph.sh b/safegraph/run-safegraph.sh index 01c54f0e6..a8ba8b90e 100644 --- a/safegraph/run-safegraph.sh +++ b/safegraph/run-safegraph.sh @@ -12,6 +12,7 @@ rm -f ./receiving/* # Run the indicator code. echo "Running the indicator..." env/bin/python -m delphi_safegraph +env/bin/python -m delphi_utils.validator # Copy the files to the ingestion directory. echo "Copying files to the ingestion directory..."