Skip to content

Release covidcast-indicators 0.3.5 #1536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 48 commits into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
749a6c8
first attempt at adding booster signals
Ananya-Joshi Jan 25, 2022
7abc758
temporary changes
Ananya-Joshi Jan 25, 2022
5b5f19e
lint changes
Ananya-Joshi Jan 26, 2022
a2a39c5
Merge remote-tracking branch 'origin/main' into HEAD
Ananya-Joshi Jan 29, 2022
e51f756
Changes after Katie's Review
Ananya-Joshi Jan 31, 2022
4fd803c
Merge remote-tracking branch 'origin/main' into HEAD
Ananya-Joshi Jan 31, 2022
470a48f
Added 4 indicators for vaccination
Ananya-Joshi Feb 2, 2022
1a87a11
Merge branch 'main' into dsew_cp_vaccination
Ananya-Joshi Feb 2, 2022
f9b62b5
working with the new overheaders
Ananya-Joshi Feb 3, 2022
499a5f4
changes to tests and lint
Ananya-Joshi Feb 3, 2022
37df65f
Merge branch 'dsew_cp_vaccination' of https://github.com/cmu-delphi/c…
Ananya-Joshi Feb 3, 2022
44f2101
removed comma in the json file
Ananya-Joshi Feb 3, 2022
53482f3
removed print statements
Ananya-Joshi Feb 3, 2022
7c0564b
remove print
Ananya-Joshi Feb 3, 2022
6a935b4
removed cumulative from 7 day
Ananya-Joshi Feb 3, 2022
95bb252
removed unused line
Ananya-Joshi Feb 6, 2022
731ed9f
added cumulative flag to remove some signals from COUNTS_7D_SIGNALS
Ananya-Joshi Feb 6, 2022
94522c2
Change the header specification
Ananya-Joshi Feb 6, 2022
3eb0381
changed if statement to assert in COUNTS_7D_SIGNALS creation
Ananya-Joshi Feb 6, 2022
8a1e357
changing as_day to be part of as_date using Nat's backward compatibil…
Ananya-Joshi Feb 6, 2022
0f93ea7
lint
Ananya-Joshi Feb 6, 2022
d2f28b6
changes to skip overheader test to pass
Ananya-Joshi Feb 6, 2022
733bdd6
added more tests for the new vaccination overheaders
Ananya-Joshi Feb 7, 2022
42a2b80
added smoothened signals to the json template and to the ansible temp…
Ananya-Joshi Feb 7, 2022
06e9dc9
Merge remote-tracking branch 'origin/main' into dsew_cp_vaccination
Ananya-Joshi Feb 7, 2022
bcf6f0b
changed api name for cumulative signals
Ananya-Joshi Feb 7, 2022
2ed2c17
Update dsew_community_profile/delphi_dsew_community_profile/pull.py
Ananya-Joshi Feb 7, 2022
f39b315
Update dsew_community_profile/delphi_dsew_community_profile/pull.py
Ananya-Joshi Feb 7, 2022
fa853ab
added new end date for vaccine signals
Ananya-Joshi Feb 9, 2022
108968a
return empty df for doses before apr 29
nmdefries Feb 14, 2022
66de89e
add check for fully_vaccinated by date
nmdefries Feb 14, 2022
a736155
in early jan 2021, no vax info available so decrement times in assert
nmdefries Feb 14, 2022
a8eada6
condense checks on signal availability
nmdefries Feb 14, 2022
760d2c2
comment
nmdefries Feb 14, 2022
8d9527e
exclude different format of by-age fully vaccinated
nmdefries Feb 15, 2022
5980eaa
Merge branch 'dsew_cp_vaccination' into ndefries/dsew-generalizations
Ananya-Joshi Feb 15, 2022
8e3b7f8
Merge pull request #1524 from cmu-delphi/ndefries/dsew-generalizations
Ananya-Joshi Feb 15, 2022
83cca2d
added original vaccination signal (pre JJ) and lint
Ananya-Joshi Feb 16, 2022
f126de7
clean-up and ready for review
Ananya-Joshi Feb 17, 2022
f2f778b
small comments + name change
nmdefries Feb 17, 2022
8c5a845
Merge pull request #1533 from cmu-delphi/bot/sync-prod-main
krivard Feb 23, 2022
2e5cb61
Merge pull request #1495 from cmu-delphi/dsew_cp_vaccination
krivard Feb 24, 2022
9cd01aa
change V17 name
nmdefries Feb 25, 2022
fd90917
add hrr to quidel ignored regions for omicron 5_17
krivard Feb 25, 2022
78d411b
dev sircal params: ignore quidel 5_17 for hrr
krivard Feb 25, 2022
4105ec0
Merge pull request #1535 from cmu-delphi/krivard/sircal-quidel-hrr
krivard Feb 25, 2022
e30e1e1
Merge pull request #1534 from cmu-delphi/ndefries/support-wave13-v17
krivard Feb 28, 2022
2786674
chore: bump covidcast-indicators to 0.3.5
Feb 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.3.4
current_version = 0.3.5
commit = True
message = chore: bump covidcast-indicators to {new_version}
tag = False
4 changes: 3 additions & 1 deletion ansible/templates/dsew_community_profile-params-prod.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"naats_total_7dav",
"naats_positivity_7dav",
"confirmed_admissions_covid_1d_prop_7dav",
"confirmed_admissions_covid_1d_7dav"
"confirmed_admissions_covid_1d_7dav",
"doses_admin_7dav",
"booster_doses_admin_7dav"
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion ansible/templates/sir_complainsalot-params-prod.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
"retired-signals": [
"raw_pct_negative","smoothed_pct_negative","raw_tests_per_device","smoothed_tests_per_device",
["covid_ag_raw_pct_positive_age_0_4", "hrr"], ["covid_ag_raw_pct_positive_age_0_4", "msa"],
["covid_ag_raw_pct_positive_age_5_17", "msa"],
["covid_ag_raw_pct_positive_age_5_17", "hrr"], ["covid_ag_raw_pct_positive_age_5_17", "msa"],
["covid_ag_raw_pct_positive_age_50_64", "hrr"], ["covid_ag_raw_pct_positive_age_50_64", "msa"],
["covid_ag_raw_pct_positive_age_65plus", "hrr"], ["covid_ag_raw_pct_positive_age_65plus", "msa"]
]
Expand Down
36 changes: 32 additions & 4 deletions dsew_community_profile/delphi_dsew_community_profile/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,50 @@ class Transform:
"total": {
"is_rate" : False,
"api_name": "naats_total_7dav",
"make_prop": False
"make_prop": False,
"cumulative" : False
},
"positivity": {
"is_rate" : True,
"api_name": "naats_positivity_7dav",
"make_prop": False
"make_prop": False,
"cumulative" : False
},
"confirmed covid-19 admissions": {
"is_rate" : False,
"api_name": "confirmed_admissions_covid_1d_7dav",
"make_prop": True,
"api_prop_name": "confirmed_admissions_covid_1d_prop_7dav"
"api_prop_name": "confirmed_admissions_covid_1d_prop_7dav",
"cumulative" : False
},
"fully vaccinated": {
"is_rate" : False,
"api_name": "people_full_vaccinated",
"make_prop": False,
"cumulative" : True
},
"booster dose since": {
"is_rate" : False,
"api_name": "people_booster_doses",
"make_prop": False,
"cumulative" : True
},
"booster doses administered": {
"is_rate" : False,
"api_name": "booster_doses_admin_7dav",
"make_prop": False,
"cumulative" : False
},
"doses administered": {
"is_rate" : False,
"api_name": "doses_admin_7dav",
"make_prop": False,
"cumulative" : False
}
}

COUNTS_7D_SIGNALS = {key for key, value in SIGNALS.items() if not value["is_rate"]}
COUNTS_7D_SIGNALS = {key for key, value in SIGNALS.items() \
if not((value["is_rate"]) or (value["cumulative"]))}

def make_signal_name(key, is_prop=False):
"""Convert a signal key to the corresponding signal name for the API.
Expand Down
179 changes: 145 additions & 34 deletions dsew_community_profile/delphi_dsew_community_profile/pull.py

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dsew_community_profile/input_cache/.gitignore

This file was deleted.

10 changes: 8 additions & 2 deletions dsew_community_profile/params.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
"export_signals": [
"confirmed covid-19 admissions",
"total",
"positivity"
"positivity",
"doses administered",
"booster doses administered",
"fully vaccinated",
"booster dose since"
]
},
"validation": {
Expand All @@ -34,7 +38,9 @@
"naats_total_7dav",
"naats_positivity_7dav",
"confirmed_admissions_covid_1d_prop_7dav",
"confirmed_admissions_covid_1d_7dav"
"confirmed_admissions_covid_1d_7dav",
"doses_admin_7dav",
"booster_doses_admin_7dav"
]
}
}
Expand Down
34 changes: 23 additions & 11 deletions dsew_community_profile/tests/test_pull.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,43 +16,49 @@
class TestPull:
def test_DatasetTimes(self):
examples = [
example(DatasetTimes("xyzzy", date(2021, 10, 30), date(2021, 10, 20), date(2021, 10, 22)),
DatasetTimes("xyzzy", date(2021, 10, 30), date(2021, 10, 20), date(2021, 10, 22))),
example(DatasetTimes("xyzzy", date(2021, 10, 30), date(2021, 10, 20), date(2021, 10, 22), date(2021, 10, 23), date(2021, 10, 24)),
DatasetTimes("xyzzy", date(2021, 10, 30), date(2021, 10, 20), date(2021, 10, 22), date(2021, 10, 23), date(2021, 10, 24))),
]
for ex in examples:
assert ex.given == ex.expected, "Equality"

dt = DatasetTimes("xyzzy", date(2021, 10, 30), date(2021, 10, 20), date(2021, 10, 22))
dt = DatasetTimes("xyzzy", date(2021, 10, 30), date(2021, 10, 20), date(2021, 10, 22), date(2021, 10, 23), date(2021, 10, 24))
assert dt["positivity"] == date(2021, 10, 30), "positivity"
assert dt["total"] == date(2021, 10, 20), "total"
assert dt["confirmed covid-19 admissions"] == date(2021, 10, 22), "confirmed covid-19 admissions"
assert dt["doses administered"] == date(2021, 10, 24), "doses administered"
assert dt["fully vaccinated"] == date(2021, 10, 23), "fully vaccinated"
with pytest.raises(ValueError):
dt["xyzzy"]

def test_DatasetTimes_from_header(self):
examples = [
example("TESTING: LAST WEEK (October 24-30, Test Volume October 20-26)",
DatasetTimes("last", date(2021, 10, 30), date(2021, 10, 26), None)),
DatasetTimes("last", date(2021, 10, 30), date(2021, 10, 26), None, None, None)),
example("TESTING: PREVIOUS WEEK (October 24-30, Test Volume October 20-26)",
DatasetTimes("previous", date(2021, 10, 30), date(2021, 10, 26), None)),
DatasetTimes("previous", date(2021, 10, 30), date(2021, 10, 26), None, None, None)),
example("TESTING: LAST WEEK (October 24-November 30, Test Volume October 20-26)",
DatasetTimes("last", date(2021, 11, 30), date(2021, 10, 26), None)),
DatasetTimes("last", date(2021, 11, 30), date(2021, 10, 26), None, None, None)),
example("VIRAL (RT-PCR) LAB TESTING: LAST WEEK (June 7-13, Test Volume June 3-9 )",
DatasetTimes("last", date(2021, 6, 13), date(2021, 6, 9), None)),
DatasetTimes("last", date(2021, 6, 13), date(2021, 6, 9), None, None, None)),
example("VIRAL (RT-PCR) LAB TESTING: LAST WEEK (March 7-13)",
DatasetTimes("last", date(2021, 3, 13), date(2021, 3, 13), None)),
DatasetTimes("last", date(2021, 3, 13), date(2021, 3, 13), None, None, None)),
example("HOSPITAL UTILIZATION: LAST WEEK (June 2-8)",
DatasetTimes("last", None, None, date(2021, 6, 8))),
DatasetTimes("last", None, None, date(2021, 6, 8), None, None)),
example("HOSPITAL UTILIZATION: LAST WEEK (June 28-July 8)",
DatasetTimes("last", None, None, date(2021, 7, 8)))
DatasetTimes("last", None, None, date(2021, 7, 8), None, None)),
example("COVID-19 VACCINATION DATA: CUMULATIVE (January 25)",
DatasetTimes("", None, None, None, date(2021, 1, 25), None)),
example("COVID-19 VACCINATION DATA: LAST WEEK (January 25-31)",
DatasetTimes("last", None, None, None, None, date(2021, 1, 25)))
]
for ex in examples:
assert DatasetTimes.from_header(ex.given, date(2021, 12, 31)) == ex.expected, ex.given

# test year boundary
examples = [
example("TESTING: LAST WEEK (October 24-30, Test Volume October 20-26)",
DatasetTimes("last", date(2020, 10, 30), date(2020, 10, 26), None)),
DatasetTimes("last", date(2020, 10, 30), date(2020, 10, 26), None, None, None)),
]
for ex in examples:
assert DatasetTimes.from_header(ex.given, date(2021, 1, 1)) == ex.expected, ex.given
Expand All @@ -78,6 +84,12 @@ def test_Dataset_skip_overheader(self):
example("HOSPITAL UTILIZATION: CHANGE FROM PREVIOUS WEEK",
True),
example("HOSPITAL UTILIZATION: DEMOGRAPHIC DATA",
True),
example("COVID-19 VACCINATION DATA: CUMULATIVE (January 25)",
False),
example("COVID-19 VACCINATION DATA: LAST WEEK (January 25-31)",
False),
example("COVID-19 VACCINATION DATA: DEMOGRAPHIC DATA",
True)
]
for ex in examples:
Expand Down
2 changes: 1 addition & 1 deletion facebook/delphiFacebook/R/responses.R
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ create_complete_responses <- function(input_data, county_crosswalk, params)
"I6_1", "I6_2", "I6_3", "I6_4", "I6_5", "I6_6", "I6_7", "I6_8",
"I7", "K1", "K2", "V11a", "V12a", "V15a", "V15b", "V16", "V3a", # added in Wave 11
"V1alt", "B13a", "V15c", "P1", "P2", "P3", "P4", "P5", "P6", # added in experimental Wave 12
"C17b", "V17_1", "V17_2", "V2b", "V2c", "V2d", # added in Wave 13
"C17b", "V17_month", "V17_year", "V2b", "V2c", "V2d", # added in Wave 13

"raceethnicity", "token", "wave", "w12_treatment", "module", "UserLanguage",
"zip5" # temporarily; we'll filter by this column later and then drop it before writing
Expand Down
2 changes: 1 addition & 1 deletion sir_complainsalot/params.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"retired-signals": [
"raw_pct_negative","smoothed_pct_negative","raw_tests_per_device","smoothed_tests_per_device",
["covid_ag_raw_pct_positive_age_0_4", "hrr"], ["covid_ag_raw_pct_positive_age_0_4", "msa"],
["covid_ag_raw_pct_positive_age_5_17", "msa"],
["covid_ag_raw_pct_positive_age_5_17", "hrr"], ["covid_ag_raw_pct_positive_age_5_17", "msa"],
["covid_ag_raw_pct_positive_age_50_64", "hrr"], ["covid_ag_raw_pct_positive_age_50_64", "msa"],
["covid_ag_raw_pct_positive_age_65plus", "hrr"], ["covid_ag_raw_pct_positive_age_65plus", "msa"]
]
Expand Down