Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Daylight Hours
    • Load CD_Daylight.csv as dictionary
    • Average over climate divisions

    • Organize by week

      Code Block
      titleDaylight 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 1109n

    • 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}


  • Weather Data

    • Create weather dictionary

      • load 1109

        • Need to average over all climate divisions?

      • convert Fahrenheit to Celsius

      • convert inches to cm

      • Organize by year/month/day

        Code Block
        titleWeather 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

      • 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 normal

    • Create degree/precip season dictioanary

      • loop through season weeks

        • average weeks 13 weeks of each of 5 seasons

  • Build File