|
40 | 40 | | rate_age_7 | double | YES | | NULL | | |
41 | 41 | +--------------+-------------+------+-----+---------+----------------+ |
42 | 42 | id: unique identifier for each record |
43 | | -release_date: the date when this record was first published by the CDC |
44 | | -issue: the epiweek of publication (e.g. issue 201453 includes epiweeks up to |
| 43 | +release_date: the date when this record was first received by Delphi |
| 44 | +issue: the epiweek of receipt by Delphi (e.g. issue 201453 includes epiweeks up to |
45 | 45 | and including 2014w53, but not 2015w01 or following) |
46 | 46 | epiweek: the epiweek during which the data was collected |
47 | 47 | location: the name of the catchment (e.g. 'network_all', 'CA', 'NY_albany') |
@@ -138,10 +138,12 @@ def update(fetcher, location, test_mode=False): |
138 | 138 | # insert/update each row of data (one per epiweek) |
139 | 139 | for epiweek in epiweeks: |
140 | 140 | lag = delta_epiweeks(epiweek, fetcher.metadata.issue) |
141 | | - if lag > MAX_AGE_TO_CONSIDER_WEEKS: |
142 | | - # Ignore values older than one year, as (1) they are assumed not to |
143 | | - # change, and (2) it would adversely affect database performance if all |
144 | | - # values (including duplicates) were stored on each run. |
| 141 | + if lag > fetcher.metadata.max_age_weeks: |
| 142 | + # Ignore obs older than `max_age_weeks` from user command line |
| 143 | + # argument `max_age`. We restricted our FluSurv API call to only |
| 144 | + # seasons older than `max_age_weeks` (in order to reduce the |
| 145 | + # amount of data being pulled), but the season by the cutoff date |
| 146 | + # may still have some weeks older than we'd like to include. |
145 | 147 | continue |
146 | 148 |
|
147 | 149 | missing_expected_groups = EXPECTED_GROUPS - data[epiweek].keys() |
|
0 commit comments