Averaging Hourly Data

J

Jake D

I have a lot of weather data for one month that is broken down by the minute.
My end goal is to take the average hourly value of the column values (temp,
humidity, etc.) and create one hourly averaged data point for each column.

So, I am having trouble averaging integer values that occur multiple times
within the same day and hour. Would like to apply this query to the entire
table to average all integers for each day and hour. There are typically
about 25 data points per hour (this number varies), for 31 days in August. I
need to have one average hourly data point for every day in the month.

Any help would be appreciated!

Thanks.
 
J

John W. Vinson

I have a lot of weather data for one month that is broken down by the minute.
My end goal is to take the average hourly value of the column values (temp,
humidity, etc.) and create one hourly averaged data point for each column.

So, I am having trouble averaging integer values that occur multiple times
within the same day and hour. Would like to apply this query to the entire
table to average all integers for each day and hour. There are typically
about 25 data points per hour (this number varies), for 31 days in August. I
need to have one average hourly data point for every day in the month.

Any help would be appreciated!

Thanks.

Try putting a calculated field in the query:
ByTheHour: Format([datefield], "yyyymmddhh")

This will have values such as 2009082111 for 11:00-11:59:59 AM August 21, and
you can use it as the GROUP BY field in a totals query.
 
J

Jake D

John-

Thanks for the tip, getting the date into that format was definitely the
key. I struggled with the syntax for the group by stuff for a bit, but
finally figured it out:

SELECT Format([Date/Time],"yyyymmddhh") AS [Date Time], Avg([Hourly Data:
Table].Temperature) AS [Temperature F], Avg([Hourly Data: Table].Humidity) AS
[Humidity %] INTO Boise_Aug_Avg_Hourly_Information
FROM [Hourly Data: Table]
GROUP BY Format([Date/Time],"yyyymmddhh");

This worked out perfectly for me, thanks again!

-jake

John W. Vinson said:
I have a lot of weather data for one month that is broken down by the minute.
My end goal is to take the average hourly value of the column values (temp,
humidity, etc.) and create one hourly averaged data point for each column.

So, I am having trouble averaging integer values that occur multiple times
within the same day and hour. Would like to apply this query to the entire
table to average all integers for each day and hour. There are typically
about 25 data points per hour (this number varies), for 31 days in August. I
need to have one average hourly data point for every day in the month.

Any help would be appreciated!

Thanks.

Try putting a calculated field in the query:
ByTheHour: Format([datefield], "yyyymmddhh")

This will have values such as 2009082111 for 11:00-11:59:59 AM August 21, and
you can use it as the GROUP BY field in a totals query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top