Skip to content

Commit af70206

Browse files
committed
Fixed max epiweek and wrong season definition commentary
1 parent 11cc6ae commit af70206

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

site/forecast.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
// We only want history back to 2009
6060
$minEpiweek = 200936;
6161

62-
// ...and we're going forward to wk 40
63-
$maxEpiweek = 202040;
62+
// ...and we're going forward to wk 41
63+
$maxEpiweek = 202041;
6464

6565
//User's previous forecast for this region
6666
$output['forecast'] = &$output['regions'][$regionID]['forecast'];
@@ -290,7 +290,8 @@ function loader(sidebarTitle,rid,parent,whitelist) {
290290
module.seasons = []; var mi=0;
291291
module.season = {};
292292
var season = -1;
293-
// CDC seasons run from week 36 to week 35 of the following year
293+
294+
// mark start and end of each season found in the data
294295
for (var i=0; i<epidata.length; i++) {
295296
var modweek = epidata[i].epiweek % 100;
296297

@@ -302,6 +303,7 @@ function loader(sidebarTitle,rid,parent,whitelist) {
302303
// check for new season
303304
var si = Math.floor(epidata[i].epiweek / 100);
304305
if (modweek < seasonDefn[0]) si = si - 1;
306+
// whitelist: don't create an extra new season for 2009-2010 week 201036-40
305307
if (season<0 || (season != si && (!whitelist || si in whitelist))) {
306308

307309
season = si;

0 commit comments

Comments
 (0)