Skip to content

Commit dd2c5f3

Browse files
committed
make imputed ILI for New York public
1 parent 63e5ae7 commit dd2c5f3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/server/api.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,15 @@ function get_fluview($epiweeks, $regions, $issues, $lag, $authorized) {
306306
$table = '`fluview` fv';
307307
$fields = "fv.`release_date`, fv.`issue`, fv.`epiweek`, fv.`region`, fv.`lag`, fv.`num_ili`, fv.`num_patients`, fv.`num_providers`, fv.`wili`, fv.`ili`, fv.`num_age_0`, fv.`num_age_1`, fv.`num_age_2`, fv.`num_age_3`, fv.`num_age_4`, fv.`num_age_5`";
308308
_get_fluview_by_table($epidata, $epiweeks, $regions, $issues, $lag, $table, $fields);
309+
if(!$authorized) {
310+
// Make a special exception for New York. It is a (weighted) sum of two
311+
// constituent locations -- "ny_minus_jfk" and "jfk" -- both of which are
312+
// publicly available.
313+
if(in_array('ny', array_map('strtolower', $regions))) {
314+
$regions = array('ny');
315+
$authorized = true;
316+
}
317+
}
309318
if($authorized) {
310319
// private data (no release date, no age groups, and wili is equal to ili)
311320
$table = '`fluview_imputed` fv';

0 commit comments

Comments
 (0)