...
- Daylight Hours
- Load CD_Daylight.csv as dictionary
Average over climate divisions
Organize by week
Code Block title Daylight hours of illinois climate divisions by week {'1': {'HRS_DYLT_DIV1': '9.228', 'HRS_DYLT_DIV2': '9.228', 'HRS_DYLT_DIV3': '9.367', 'HRS_DYLT_DIV4': '9.367', 'HRS_DYLT_DIV5': '9.350', 'HRS_DYLT_DIV6': '9.467', 'HRS_DYLT_DIV7': '9.489', 'HRS_DYLT_DIV8': '9.600', 'HRS_DYLT_DIV9': '9.600', 'WEEK': '1', 'average': 9.410666666666664}, '10': {'HRS_DYLT_DIV1': '11.400', ...
Do these weeks match with cdc_week old or new?
30 Year Normals
load 1109nIn the 'get_weather' endpoint, create file '11avg' which is average of weather for all illinois climate divisions
Add temps from all climate divs and divide by 18
Add precip from all climate divs and divide by 9
load 11avg
convert temp to celsius
- average daily temps: if > 22.0 subtract 22, if =< 22.0 set to 0
convert precip to cm
sum both precip and temp and divide by number of rows
Code Block {'precip': 0.29342714246599594, 'temp': 6.404089724478522}Temp 30 year total: 123310.944444 Temp 30 year normal 11.2540790768 Precip 30 year total: 2821.6098 Precip 30 year normal 0.257516637766
Weather Data
Create weather dictionary
load 1109
Need to average over all climate divisions?
11avg
convert Fahrenheit to Celsius
convert inches to cm
Organize by year/month/day
Code Block title Weather Dictionary Year/Month/Day { '2017': {'1': {'1': {'climate_div': '9', 'precip': 0.0762, 'state': 'IL', 'temp_max': 7.777777777777778, 'temp_min': 0.7222222222222207}, '10': {'climate_div': '9', ...
Create degree/precip week dictionary for a single climate division
Loop through years and weeks
get list of dates for week from database
calculate day_average - (temp_max + temp_min)/2 if < 22.0 day_average=0
temp week = total/7
deg_week = temp_week - 30 year temp normalstart creating data for first week > 0
average week's temps: Sum(daily averages -22)7
Create degree/precip season dictioanary
loop through season weeks
average weeks 13 weeks of each of 5 seasons
Build File
...