|
| 1 | +### New API response from https://gis.cdc.gov/GRASP/Flu3/PostPhase03DataTool?appVersion=Public |
| 2 | +# with payload |
| 3 | +# {"appversion": "Public", "key": "", "injson": []} |
| 4 | +{ |
| 5 | + # Last data update date |
| 6 | + 'loaddatetime': 'Aug 26, 2023', |
| 7 | + # Text appearing on dashboard |
| 8 | + 'app_text': [ |
| 9 | + { |
| 10 | + 'description': 'SplashScreenDisclaimerText', |
| 11 | + 'text': 'The <a href=\'https://www.cdc.gov/flu/weekly/influenza-hospitalization-surveillance.htm\' target=\'_blank\' rel=\'noopener noreferrer\'>Influenza Hospitalization Surveillance Network</a> (FluSurv-NET) conducts population-based surveillance for laboratory-confirmed influenza-associated hospitalizations in children (persons younger than 18 years) and adults. The current network covers over 70 counties in the 10 Emerging Infection..." |
| 12 | + } |
| 13 | + ], |
| 14 | + # IDs for different data sources/networks |
| 15 | + 'networks': [ |
| 16 | + {'networkid': 1, 'name': 'FluSurv-NET'}, |
| 17 | + {'networkid': 2, 'name': 'EIP'}, |
| 18 | + {'networkid': 3, 'name': 'IHSP'} |
| 19 | + ], |
| 20 | + # IDs (network ID + catchment ID) specifying geos and data sources available |
| 21 | + 'catchments': [ |
| 22 | + {'networkid': 1, 'name': 'FluSurv-NET', 'area': 'Entire Network', 'catchmentid': '22', 'beginseasonid': 49, 'endseasonid': 51}, |
| 23 | + |
| 24 | + {'networkid': 2, 'name': 'EIP', 'area': 'California', 'catchmentid': '1', 'beginseasonid': 43, 'endseasonid': 51}, |
| 25 | + {'networkid': 2, 'name': 'EIP', 'area': 'Colorado', 'catchmentid': '2', 'beginseasonid': 43, 'endseasonid': 51}, |
| 26 | + {'networkid': 2, 'name': 'EIP', 'area': 'Connecticut', 'catchmentid': '3', 'beginseasonid': 43, 'endseasonid': 51}, |
| 27 | + {'networkid': 2, 'name': 'EIP', 'area': 'Entire Network', 'catchmentid': '22', 'beginseasonid': 49, 'endseasonid': 51}, |
| 28 | + {'networkid': 2, 'name': 'EIP', 'area': 'Georgia', 'catchmentid': '4', 'beginseasonid': 43, 'endseasonid': 51}, |
| 29 | + {'networkid': 2, 'name': 'EIP', 'area': 'Maryland', 'catchmentid': '7', 'beginseasonid': 43, 'endseasonid': 51}, |
| 30 | + {'networkid': 2, 'name': 'EIP', 'area': 'Minnesota', 'catchmentid': '9', 'beginseasonid': 43, 'endseasonid': 51}, |
| 31 | + {'networkid': 2, 'name': 'EIP', 'area': 'New Mexico', 'catchmentid': '11', 'beginseasonid': 43, 'endseasonid': 51}, |
| 32 | + {'networkid': 2, 'name': 'EIP', 'area': 'New York - Albany', 'catchmentid': '13', 'beginseasonid': 43, 'endseasonid': 51}, |
| 33 | + {'networkid': 2, 'name': 'EIP', 'area': 'New York - Rochester', 'catchmentid': '14', 'beginseasonid': 43, 'endseasonid': 51}, |
| 34 | + {'networkid': 2, 'name': 'EIP', 'area': 'Oregon', 'catchmentid': '17', 'beginseasonid': 43, 'endseasonid': 51}, |
| 35 | + {'networkid': 2, 'name': 'EIP', 'area': 'Tennessee', 'catchmentid': '20', 'beginseasonid': 43, 'endseasonid': 51}, |
| 36 | + |
| 37 | + {'networkid': 3, 'name': 'IHSP', 'area': 'Entire Network', 'catchmentid': '22', 'beginseasonid': 49, 'endseasonid': 51}, |
| 38 | + {'networkid': 3, 'name': 'IHSP', 'area': 'Idaho', 'catchmentid': '6', 'beginseasonid': 49, 'endseasonid': 51}, |
| 39 | + {'networkid': 3, 'name': 'IHSP', 'area': 'Iowa', 'catchmentid': '5', 'beginseasonid': 49, 'endseasonid': 51}, |
| 40 | + {'networkid': 3, 'name': 'IHSP', 'area': 'Michigan', 'catchmentid': '8', 'beginseasonid': 49, 'endseasonid': 51}, |
| 41 | + {'networkid': 3, 'name': 'IHSP', 'area': 'Ohio', 'catchmentid': '15', 'beginseasonid': 50, 'endseasonid': 51}, |
| 42 | + {'networkid': 3, 'name': 'IHSP', 'area': 'Oklahoma', 'catchmentid': '16', 'beginseasonid': 49, 'endseasonid': 50}, |
| 43 | + {'networkid': 3, 'name': 'IHSP', 'area': 'Rhode Island', 'catchmentid': '18', 'beginseasonid': 50, 'endseasonid': 51}, |
| 44 | + {'networkid': 3, 'name': 'IHSP', 'area': 'South Dakota', 'catchmentid': '19', 'beginseasonid': 49, 'endseasonid': 49}, |
| 45 | + {'networkid': 3, 'name': 'IHSP', 'area': 'Utah', 'catchmentid': '21', 'beginseasonid': 50, 'endseasonid': 51} |
| 46 | + ], |
| 47 | + # Season labels, descriptions, IDs, and date ranges |
| 48 | + 'seasons': [ |
| 49 | + {'description': 'Season 2006-07', 'enabled': True, 'endweek': 2387, 'label': '2006-07', 'seasonid': 46, 'startweek': 2336, 'IncludeWeeklyRatesAndStrata': True}, |
| 50 | + {'description': 'Season 2003-04', 'enabled': True, 'endweek': 2231, 'label': '2003-04', 'seasonid': 43, 'startweek': 2179, 'IncludeWeeklyRatesAndStrata': True}, |
| 51 | + {'description': 'Season 2009-10', 'enabled': True, 'endweek': 2544, 'label': '2009-10', 'seasonid': 49, 'startweek': 2488, 'IncludeWeeklyRatesAndStrata': True}, |
| 52 | + {'description': 'Season 2012-13', 'enabled': True, 'endweek': 2700, 'label': '2012-13', 'seasonid': 52, 'startweek': 2649, 'IncludeWeeklyRatesAndStrata': True}, |
| 53 | + {'description': 'Season 2015-16', 'enabled': True, 'endweek': 2857, 'label': '2015-16', 'seasonid': 55, 'startweek': 2806, 'IncludeWeeklyRatesAndStrata': True}, |
| 54 | + ... |
| 55 | + ], |
| 56 | + # Descriptions of data repporting groups (age, race, sex, and overall). Careful, some of these overlap. |
| 57 | + # some of "parentidoverlap. |
| 58 | + 'master_lookup': [ |
| 59 | + {'Variable': 'Age', 'valueid': 1, 'parentid': 97, 'Label': '0-4 yr', 'Color_HexValue': '#d19833', 'Enabled': True}, |
| 60 | + {'Variable': 'Age', 'valueid': 2, 'parentid': 97, 'Label': '5-17 yr', 'Color_HexValue': '#707070', 'Enabled': True}, |
| 61 | + {'Variable': 'Age', 'valueid': 3, 'parentid': 98, 'Label': '18-49 yr', 'Color_HexValue': '#44b3c6', 'Enabled': True}, |
| 62 | + {'Variable': 'Age', 'valueid': 4, 'parentid': 98, 'Label': '50-64 yr', 'Color_HexValue': '#516889', 'Enabled': True}, |
| 63 | + {'Variable': 'Age', 'valueid': 5, 'parentid': 98, 'Label': '65+ yr', 'Color_HexValue': '#cc5e56', 'Enabled': True}, |
| 64 | + {'Variable': 'Age', 'valueid': 7, 'parentid': 5, 'Label': '65-74 yr', 'Color_HexValue': '#cc5e56', 'Enabled': True}, |
| 65 | + {'Variable': 'Age', 'valueid': 8, 'parentid': 5, 'Label': '75-84 yr', 'Color_HexValue': '#cc5e56', 'Enabled': True}, |
| 66 | + {'Variable': 'Age', 'valueid': 9, 'parentid': 5, 'Label': '85+', 'Color_HexValue': '#cc5e56', 'Enabled': True}, |
| 67 | + {'Variable': 'Age', 'valueid': 10, 'parentid': 3, 'Label': '18-29 yr', 'Color_HexValue': '#44b3c6', 'Enabled': True}, |
| 68 | + {'Variable': 'Age', 'valueid': 11, 'parentid': 3, 'Label': '30-39 yr', 'Color_HexValue': '#44b3c6', 'Enabled': True}, |
| 69 | + {'Variable': 'Age', 'valueid': 12, 'parentid': 3, 'Label': '40-49 yr', 'Color_HexValue': '#44b3c6', 'Enabled': True}, |
| 70 | + {'Variable': 'Age', 'valueid': 21, 'parentid': 2, 'Label': '5-11 yr', 'Color_HexValue': '#707070', 'Enabled': True}, |
| 71 | + {'Variable': 'Age', 'valueid': 22, 'parentid': 2, 'Label': '12-17 yr', 'Color_HexValue': '#707070', 'Enabled': True}, |
| 72 | + {'Variable': 'Age', 'valueid': 97, 'parentid': 0, 'Label': '< 18', 'Color_HexValue': '#000000', 'Enabled': True}, |
| 73 | + {'Variable': 'Age', 'valueid': 98, 'parentid': 0, 'Label': '>= 18', 'Color_HexValue': '#000000', 'Enabled': True}, |
| 74 | + |
| 75 | + {'Variable': 'Race', 'valueid': 1, 'parentid': None, 'Label': 'White', 'Color_HexValue': '#516889', 'Enabled': True}, |
| 76 | + {'Variable': 'Race', 'valueid': 2, 'parentid': None, 'Label': 'Black', 'Color_HexValue': '#44b3c6', 'Enabled': True}, |
| 77 | + {'Variable': 'Race', 'valueid': 3, 'parentid': None, 'Label': 'Hispanic/Latino', 'Color_HexValue': '#d19833', 'Enabled': True}, |
| 78 | + {'Variable': 'Race', 'valueid': 4, 'parentid': None, 'Label': 'Asian/Pacific Islander', 'Color_HexValue': '#cc5e56', 'Enabled': True}, |
| 79 | + {'Variable': 'Race', 'valueid': 5, 'parentid': None, 'Label': 'American Indian/Alaska Native', 'Color_HexValue': '#007d8e', 'Enabled': True}, |
| 80 | + |
| 81 | + {'Variable': 'Sex', 'valueid': 1, 'parentid': None, 'Label': 'Male', 'Color_HexValue': '#44b3c6', 'Enabled': True}, |
| 82 | + {'Variable': 'Sex', 'valueid': 2, 'parentid': None, 'Label': 'Female', 'Color_HexValue': '#F2775F', 'Enabled': True}, |
| 83 | + |
| 84 | + {'Variable': None, 'valueid': 0, 'parentid': 0, 'Label': 'Overall', 'Color_HexValue': '#000000', 'Enabled': True}, |
| 85 | + ], |
| 86 | + # Colors by ID, presumably used in dashboard. Appears to be only some of the age groups. Also doesn't agree with "master_lookup" above. |
| 87 | + 'colors_qualitative': [ |
| 88 | + {'id': 1, 'hex': '#a6cee3'}, |
| 89 | + {'id': 2, 'hex': '#1f78b4'}, |
| 90 | + {'id': 3, 'hex': '#b2df8a'}, |
| 91 | + {'id': 4, 'hex': '#33a02c'}, |
| 92 | + {'id': 5, 'hex': '#fb9a99'}, |
| 93 | + {'id': 6, 'hex': '#e31a1c'}, |
| 94 | + {'id': 7, 'hex': '#fdbf6f'}, |
| 95 | + {'id': 8, 'hex': '#ff7f00'}, |
| 96 | + {'id': 9, 'hex': '#cab2d6'}, |
| 97 | + {'id': 10, 'hex': '#6a3d9a'}, |
| 98 | + {'id': 12, 'hex': '#b15928'} |
| 99 | + ], |
| 100 | + # List of ageids available for each network+catchement combo |
| 101 | + 'age_catchment_lookup': [ |
| 102 | + {'NetworkId': 1, 'CatchmentID': 22}, |
| 103 | + {'ageID': 1, 'NetworkId': 1, 'CatchmentID': 22}, |
| 104 | + {'ageID': 2, 'NetworkId': 1, 'CatchmentID': 22}, |
| 105 | + {'ageID': 3, 'NetworkId': 1, 'CatchmentID': 22}, |
| 106 | + {'ageID': 4, 'NetworkId': 1, 'CatchmentID': 22}, |
| 107 | + {'ageID': 5, 'NetworkId': 1, 'CatchmentID': 22}, |
| 108 | + {'ageID': 7, 'NetworkId': 1, 'CatchmentID': 22}, |
| 109 | + {'ageID': 8, 'NetworkId': 1, 'CatchmentID': 22}, |
| 110 | + {'ageID': 9, 'NetworkId': 1, 'CatchmentID': 22}, |
| 111 | + {'ageID': 10, 'NetworkId': 1, 'CatchmentID': 22}, |
| 112 | + {'ageID': 11, 'NetworkId': 1, 'CatchmentID': 22}, |
| 113 | + {'ageID': 12, 'NetworkId': 1, 'CatchmentID': 22}, |
| 114 | + {'ageID': 21, 'NetworkId': 1, 'CatchmentID': 22}, |
| 115 | + {'ageID': 22, 'NetworkId': 1, 'CatchmentID': 22}, |
| 116 | + {'ageID': 97, 'NetworkId': 1, 'CatchmentID': 22}, |
| 117 | + {'ageID': 98, 'NetworkId': 1, 'CatchmentID': 22}, |
| 118 | + {'ageID': 99, 'NetworkId': 1, 'CatchmentID': 22}, |
| 119 | + {'NetworkId': 2, 'CatchmentID': 1}, |
| 120 | + {'ageID': 1, 'NetworkId': 2, 'CatchmentID': 1}, |
| 121 | + {'ageID': 2, 'NetworkId': 2, 'CatchmentID': 1}, |
| 122 | + ... |
| 123 | + ], |
| 124 | + # List of seasonids available for each network+catchement combo |
| 125 | + 'season_catchment_lookup': [ |
| 126 | + {'seasonid': 49, 'NetworkId': 1, 'CatchmentID': 22}, |
| 127 | + {'seasonid': 50, 'NetworkId': 1, 'CatchmentID': 22}, |
| 128 | + {'seasonid': 51, 'NetworkId': 1, 'CatchmentID': 22}, |
| 129 | + {'seasonid': 52, 'NetworkId': 1, 'CatchmentID': 22}, |
| 130 | + ... |
| 131 | + {'raceid': 4, 'NetworkId': 2, 'CatchmentID': 14}, |
| 132 | + {'raceid': 5, 'NetworkId': 2, 'CatchmentID': 14}, |
| 133 | + {'raceid': 99, 'NetworkId': 2, 'CatchmentID': 14}, |
| 134 | + {'NetworkId': 2, 'CatchmentID': 17}, |
| 135 | + ... |
| 136 | + ], |
| 137 | + # Data!! But only for the overall category. Format is list |
| 138 | + # of dicts. Each obs' fields are labelled, so we could easily |
| 139 | + # convert this to dataframe. |
| 140 | + 'default_data': [ |
| 141 | + {'networkid': 1, 'catchmentid': 22, 'seasonid': 49, 'ageid': 0, 'sexid': 0, 'raceid': 1, 'rate': 4.3, 'weeklyrate': 1.7, 'mmwrid': 2493}, |
| 142 | + {'networkid': 1, 'catchmentid': 22, 'seasonid': 49, 'ageid': 0, 'sexid': 0, 'raceid': 1, 'rate': 20.3, 'weeklyrate': 0.1, 'mmwrid': 2513}, |
| 143 | + {'networkid': 1, 'catchmentid': 22, 'seasonid': 49, 'ageid': 0, 'sexid': 0, 'raceid': 1, 'rate': 20.6, 'weeklyrate': 0.1, 'mmwrid': 2516}, |
| 144 | + {'networkid': 1, 'catchmentid': 22, 'seasonid': 49, 'ageid': 0, 'sexid': 0, 'raceid': 1, 'rate': 20.7, 'weeklyrate': 0.0, 'mmwrid': 2519}, |
| 145 | + {'networkid': 1, 'catchmentid': 22, 'seasonid': 49, 'ageid': 0, 'sexid': 0, 'raceid': 2, 'rate': 11.6, 'weeklyrate': 3.6, 'mmwrid': 2493}, |
| 146 | + {'networkid': 1, 'catchmentid': 22, 'seasonid': 49, 'ageid': 0, 'sexid': 0, 'raceid': 2, 'rate': 39.6, 'weeklyrate': 0.3, 'mmwrid': 2513}, |
| 147 | + {'networkid': 1, 'catchmentid': 22, 'seasonid': 49, 'ageid': 0, 'sexid': 0, 'raceid': 2, 'rate': 40.7, 'weeklyrate': 0.5, 'mmwrid': 2516}, |
| 148 | + {'networkid': 1, 'catchmentid': 22, 'seasonid': 49, 'ageid': 0, 'sexid': 0, 'raceid': 2, 'rate': 41.3, 'weeklyrate': 0.1, 'mmwrid': 2519}, |
| 149 | + {'networkid': 1, 'catchmentid': 22, 'seasonid': 49, 'ageid': 0, 'sexid': 0, 'raceid': 3, 'rate': 12.8, 'weeklyrate': 4.8, 'mmwrid': 2493}, |
| 150 | + {'networkid': 1, 'catchmentid': 22, 'seasonid': 49, 'ageid': 0, 'sexid': 0, 'raceid': 3, 'rate': 36.0, 'weeklyrate': 0.1, 'mmwrid': 2513}, |
| 151 | + ... |
| 152 | + ], |
| 153 | + # Mapping each mmwrid to a week number, season, and date. Could use this instead of our current epoch-based function. |
| 154 | + 'mmwr': [ |
| 155 | + ..., |
| 156 | + {'mmwrid': 2828, 'weekend': '2016-03-12', 'weeknumber': 10, 'weekstart': '2016-03-06', 'year': 2016, 'yearweek': 201610, 'seasonid': 55, 'label': 'Mar-12-2016', 'weekendlabel': 'Mar 12, 2016', 'weekendlabel2': 'Mar-12-2016'}, |
| 157 | + {'mmwrid': 2885, 'weekend': '2017-04-15', 'weeknumber': 15, 'weekstart': '2017-04-09', 'year': 2017, 'yearweek': 201715, 'seasonid': 56, 'label': 'Apr-15-2017', 'weekendlabel': 'Apr 15, 2017', 'weekendlabel2': 'Apr-15-2017'}, |
| 158 | + {'mmwrid': 2911, 'weekend': '2017-10-14', 'weeknumber': 41, 'weekstart': '2017-10-08', 'year': 2017, 'yearweek': 201741, 'seasonid': 57, 'label': 'Oct-14-2017', 'weekendlabel': 'Oct 14, 2017', 'weekendlabel2': 'Oct-14-2017'}, |
| 159 | + {'mmwrid': 2928, 'weekend': '2018-02-10', 'weeknumber': 6, 'weekstart': '2018-02-04', 'year': 2018, 'yearweek': 201806, 'seasonid': 57, 'label': 'Feb-10-2018', 'weekendlabel': 'Feb 10, 2018', 'weekendlabel2': 'Feb-10-2018'}, |
| 160 | + {'mmwrid': 2974, 'weekend': '2018-12-29', 'weeknumber': 52, 'weekstart': '2018-12-23', 'year': 2018, 'yearweek': 201852, 'seasonid': 58, 'label': 'Dec-29-2018', 'weekendlabel': 'Dec 29, 2018', 'weekendlabel2': 'Dec-29-2018'}, |
| 161 | + {'mmwrid': 3031, 'weekend': '2020-02-01', 'weeknumber': 5, 'weekstart': '2020-01-26', 'year': 2020, 'yearweek': 202005, 'seasonid': 59, 'label': 'Feb-01-2020', 'weekendlabel': 'Feb 01, 2020', 'weekendlabel2': 'Feb-01-2020'}, |
| 162 | + {'mmwrid': 3037, 'weekend': '2020-03-14', 'weeknumber': 11, 'weekstart': '2020-03-08', 'year': 2020, 'yearweek': 202011, 'seasonid': 59, 'label': 'Mar-14-2020', 'weekendlabel': 'Mar 14, 2020', 'weekendlabel2': 'Mar-14-2020'}, |
| 163 | + {'mmwrid': 3077, 'weekend': '2020-12-19', 'weeknumber': 51, 'weekstart': '2020-12-13', 'year': 2020, 'yearweek': 202051, 'seasonid': 60, 'label': 'Dec-19-2020', 'weekendlabel': 'Dec 19, 2020', 'weekendlabel2': 'Dec-19-2020'}, |
| 164 | + {'mmwrid': 3140, 'weekend': '2022-03-05', 'weeknumber': 9, 'weekstart': '2022-02-27', 'year': 2022, 'yearweek': 202209, 'seasonid': 61, 'label': 'Mar-05-2022', 'weekendlabel': 'Mar 05, 2022', 'weekendlabel2': 'Mar-05-2022'}, |
| 165 | + {'mmwrid': 3183, 'weekend': '2022-12-31', 'weeknumber': 52, 'weekstart': '2022-12-25', 'year': 2022, 'yearweek': 202252, 'seasonid': 62, 'label': 'Dec-31-2022', 'weekendlabel': 'Dec 31, 2022', 'weekendlabel2': 'Dec-31-2022'}, |
| 166 | + ] |
| 167 | +} |
0 commit comments