Skip to content

Commit ac58cab

Browse files
authored
Merge pull request #1536 from cmu-delphi/release/indicators_v0.3.5_utils_v0.3.1
Release covidcast-indicators 0.3.5
2 parents e9e30a4 + 2786674 commit ac58cab

File tree

10 files changed

+215
-57
lines changed

10 files changed

+215
-57
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 = 0.3.4
2+
current_version = 0.3.5
33
commit = True
44
message = chore: bump covidcast-indicators to {new_version}
55
tag = False

ansible/templates/dsew_community_profile-params-prod.json.j2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
"naats_total_7dav",
2929
"naats_positivity_7dav",
3030
"confirmed_admissions_covid_1d_prop_7dav",
31-
"confirmed_admissions_covid_1d_7dav"
31+
"confirmed_admissions_covid_1d_7dav",
32+
"doses_admin_7dav",
33+
"booster_doses_admin_7dav"
3234
]
3335
}
3436
}

ansible/templates/sir_complainsalot-params-prod.json.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
"retired-signals": [
142142
"raw_pct_negative","smoothed_pct_negative","raw_tests_per_device","smoothed_tests_per_device",
143143
["covid_ag_raw_pct_positive_age_0_4", "hrr"], ["covid_ag_raw_pct_positive_age_0_4", "msa"],
144-
["covid_ag_raw_pct_positive_age_5_17", "msa"],
144+
["covid_ag_raw_pct_positive_age_5_17", "hrr"], ["covid_ag_raw_pct_positive_age_5_17", "msa"],
145145
["covid_ag_raw_pct_positive_age_50_64", "hrr"], ["covid_ag_raw_pct_positive_age_50_64", "msa"],
146146
["covid_ag_raw_pct_positive_age_65plus", "hrr"], ["covid_ag_raw_pct_positive_age_65plus", "msa"]
147147
]

dsew_community_profile/delphi_dsew_community_profile/constants.py

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,50 @@ class Transform:
5151
"total": {
5252
"is_rate" : False,
5353
"api_name": "naats_total_7dav",
54-
"make_prop": False
54+
"make_prop": False,
55+
"cumulative" : False
5556
},
5657
"positivity": {
5758
"is_rate" : True,
5859
"api_name": "naats_positivity_7dav",
59-
"make_prop": False
60+
"make_prop": False,
61+
"cumulative" : False
6062
},
6163
"confirmed covid-19 admissions": {
6264
"is_rate" : False,
6365
"api_name": "confirmed_admissions_covid_1d_7dav",
6466
"make_prop": True,
65-
"api_prop_name": "confirmed_admissions_covid_1d_prop_7dav"
67+
"api_prop_name": "confirmed_admissions_covid_1d_prop_7dav",
68+
"cumulative" : False
69+
},
70+
"fully vaccinated": {
71+
"is_rate" : False,
72+
"api_name": "people_full_vaccinated",
73+
"make_prop": False,
74+
"cumulative" : True
75+
},
76+
"booster dose since": {
77+
"is_rate" : False,
78+
"api_name": "people_booster_doses",
79+
"make_prop": False,
80+
"cumulative" : True
81+
},
82+
"booster doses administered": {
83+
"is_rate" : False,
84+
"api_name": "booster_doses_admin_7dav",
85+
"make_prop": False,
86+
"cumulative" : False
87+
},
88+
"doses administered": {
89+
"is_rate" : False,
90+
"api_name": "doses_admin_7dav",
91+
"make_prop": False,
92+
"cumulative" : False
6693
}
6794
}
6895

69-
COUNTS_7D_SIGNALS = {key for key, value in SIGNALS.items() if not value["is_rate"]}
96+
COUNTS_7D_SIGNALS = {key for key, value in SIGNALS.items() \
97+
if not((value["is_rate"]) or (value["cumulative"]))}
7098

7199
def make_signal_name(key, is_prop=False):
72100
"""Convert a signal key to the corresponding signal name for the API.

dsew_community_profile/delphi_dsew_community_profile/pull.py

Lines changed: 145 additions & 34 deletions
Large diffs are not rendered by default.

dsew_community_profile/input_cache/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

dsew_community_profile/params.json.template

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
"export_signals": [
1212
"confirmed covid-19 admissions",
1313
"total",
14-
"positivity"
14+
"positivity",
15+
"doses administered",
16+
"booster doses administered",
17+
"fully vaccinated",
18+
"booster dose since"
1519
]
1620
},
1721
"validation": {
@@ -34,7 +38,9 @@
3438
"naats_total_7dav",
3539
"naats_positivity_7dav",
3640
"confirmed_admissions_covid_1d_prop_7dav",
37-
"confirmed_admissions_covid_1d_7dav"
41+
"confirmed_admissions_covid_1d_7dav",
42+
"doses_admin_7dav",
43+
"booster_doses_admin_7dav"
3844
]
3945
}
4046
}

dsew_community_profile/tests/test_pull.py

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,43 +16,49 @@
1616
class TestPull:
1717
def test_DatasetTimes(self):
1818
examples = [
19-
example(DatasetTimes("xyzzy", date(2021, 10, 30), date(2021, 10, 20), date(2021, 10, 22)),
20-
DatasetTimes("xyzzy", date(2021, 10, 30), date(2021, 10, 20), date(2021, 10, 22))),
19+
example(DatasetTimes("xyzzy", date(2021, 10, 30), date(2021, 10, 20), date(2021, 10, 22), date(2021, 10, 23), date(2021, 10, 24)),
20+
DatasetTimes("xyzzy", date(2021, 10, 30), date(2021, 10, 20), date(2021, 10, 22), date(2021, 10, 23), date(2021, 10, 24))),
2121
]
2222
for ex in examples:
2323
assert ex.given == ex.expected, "Equality"
2424

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

3234
def test_DatasetTimes_from_header(self):
3335
examples = [
3436
example("TESTING: LAST WEEK (October 24-30, Test Volume October 20-26)",
35-
DatasetTimes("last", date(2021, 10, 30), date(2021, 10, 26), None)),
37+
DatasetTimes("last", date(2021, 10, 30), date(2021, 10, 26), None, None, None)),
3638
example("TESTING: PREVIOUS WEEK (October 24-30, Test Volume October 20-26)",
37-
DatasetTimes("previous", date(2021, 10, 30), date(2021, 10, 26), None)),
39+
DatasetTimes("previous", date(2021, 10, 30), date(2021, 10, 26), None, None, None)),
3840
example("TESTING: LAST WEEK (October 24-November 30, Test Volume October 20-26)",
39-
DatasetTimes("last", date(2021, 11, 30), date(2021, 10, 26), None)),
41+
DatasetTimes("last", date(2021, 11, 30), date(2021, 10, 26), None, None, None)),
4042
example("VIRAL (RT-PCR) LAB TESTING: LAST WEEK (June 7-13, Test Volume June 3-9 )",
41-
DatasetTimes("last", date(2021, 6, 13), date(2021, 6, 9), None)),
43+
DatasetTimes("last", date(2021, 6, 13), date(2021, 6, 9), None, None, None)),
4244
example("VIRAL (RT-PCR) LAB TESTING: LAST WEEK (March 7-13)",
43-
DatasetTimes("last", date(2021, 3, 13), date(2021, 3, 13), None)),
45+
DatasetTimes("last", date(2021, 3, 13), date(2021, 3, 13), None, None, None)),
4446
example("HOSPITAL UTILIZATION: LAST WEEK (June 2-8)",
45-
DatasetTimes("last", None, None, date(2021, 6, 8))),
47+
DatasetTimes("last", None, None, date(2021, 6, 8), None, None)),
4648
example("HOSPITAL UTILIZATION: LAST WEEK (June 28-July 8)",
47-
DatasetTimes("last", None, None, date(2021, 7, 8)))
49+
DatasetTimes("last", None, None, date(2021, 7, 8), None, None)),
50+
example("COVID-19 VACCINATION DATA: CUMULATIVE (January 25)",
51+
DatasetTimes("", None, None, None, date(2021, 1, 25), None)),
52+
example("COVID-19 VACCINATION DATA: LAST WEEK (January 25-31)",
53+
DatasetTimes("last", None, None, None, None, date(2021, 1, 25)))
4854
]
4955
for ex in examples:
5056
assert DatasetTimes.from_header(ex.given, date(2021, 12, 31)) == ex.expected, ex.given
5157

5258
# test year boundary
5359
examples = [
5460
example("TESTING: LAST WEEK (October 24-30, Test Volume October 20-26)",
55-
DatasetTimes("last", date(2020, 10, 30), date(2020, 10, 26), None)),
61+
DatasetTimes("last", date(2020, 10, 30), date(2020, 10, 26), None, None, None)),
5662
]
5763
for ex in examples:
5864
assert DatasetTimes.from_header(ex.given, date(2021, 1, 1)) == ex.expected, ex.given
@@ -78,6 +84,12 @@ def test_Dataset_skip_overheader(self):
7884
example("HOSPITAL UTILIZATION: CHANGE FROM PREVIOUS WEEK",
7985
True),
8086
example("HOSPITAL UTILIZATION: DEMOGRAPHIC DATA",
87+
True),
88+
example("COVID-19 VACCINATION DATA: CUMULATIVE (January 25)",
89+
False),
90+
example("COVID-19 VACCINATION DATA: LAST WEEK (January 25-31)",
91+
False),
92+
example("COVID-19 VACCINATION DATA: DEMOGRAPHIC DATA",
8193
True)
8294
]
8395
for ex in examples:

facebook/delphiFacebook/R/responses.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ create_complete_responses <- function(input_data, county_crosswalk, params)
648648
"I6_1", "I6_2", "I6_3", "I6_4", "I6_5", "I6_6", "I6_7", "I6_8",
649649
"I7", "K1", "K2", "V11a", "V12a", "V15a", "V15b", "V16", "V3a", # added in Wave 11
650650
"V1alt", "B13a", "V15c", "P1", "P2", "P3", "P4", "P5", "P6", # added in experimental Wave 12
651-
"C17b", "V17_1", "V17_2", "V2b", "V2c", "V2d", # added in Wave 13
651+
"C17b", "V17_month", "V17_year", "V2b", "V2c", "V2d", # added in Wave 13
652652

653653
"raceethnicity", "token", "wave", "w12_treatment", "module", "UserLanguage",
654654
"zip5" # temporarily; we'll filter by this column later and then drop it before writing

sir_complainsalot/params.json.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"retired-signals": [
141141
"raw_pct_negative","smoothed_pct_negative","raw_tests_per_device","smoothed_tests_per_device",
142142
["covid_ag_raw_pct_positive_age_0_4", "hrr"], ["covid_ag_raw_pct_positive_age_0_4", "msa"],
143-
["covid_ag_raw_pct_positive_age_5_17", "msa"],
143+
["covid_ag_raw_pct_positive_age_5_17", "hrr"], ["covid_ag_raw_pct_positive_age_5_17", "msa"],
144144
["covid_ag_raw_pct_positive_age_50_64", "hrr"], ["covid_ag_raw_pct_positive_age_50_64", "msa"],
145145
["covid_ag_raw_pct_positive_age_65plus", "hrr"], ["covid_ag_raw_pct_positive_age_65plus", "msa"]
146146
]

0 commit comments

Comments
 (0)