I have the daily high temperatures for a city from 1929-2020 (over 33,600 data points), and I am trying to figure out how to calculate the average daily high temperature for each calendar date between April 1 and September 30.
For example, what is the average daily high temperature for April 1 each year? In order to calculate this value, I need to include the daily high temperatures for April 1, 1929; April 1, 1930, April 1, 1931, April 1, 1932, etc. through 2020.
I am trying to figure out how to structure the function to grab the temperatures from dates at specific intervals in the list, but the leap years are frustrating my efforts.
The numerical equivalent for the date April 1, 1929 is equal to 10,684.
For April 1, 1930, you would add 365 to 10,684 to get 11,049.
For April 1, 1931, you would add 365 to 11,049 to get 11,414.
For April 1, 1932, you would add 366 (leap year) to 11,414 to get 11,780
If anyone has any suggestions about how to accomplish this task, I am all ears.
Thank you
Eric
For example, what is the average daily high temperature for April 1 each year? In order to calculate this value, I need to include the daily high temperatures for April 1, 1929; April 1, 1930, April 1, 1931, April 1, 1932, etc. through 2020.
I am trying to figure out how to structure the function to grab the temperatures from dates at specific intervals in the list, but the leap years are frustrating my efforts.
The numerical equivalent for the date April 1, 1929 is equal to 10,684.
For April 1, 1930, you would add 365 to 10,684 to get 11,049.
For April 1, 1931, you would add 365 to 11,049 to get 11,414.
For April 1, 1932, you would add 366 (leap year) to 11,414 to get 11,780
If anyone has any suggestions about how to accomplish this task, I am all ears.
Thank you
Eric