PC Review


Reply
Thread Tools Rate Thread

Averaging Hourly Data

 
 
Jake D
Guest
Posts: n/a
 
      17th May 2010
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.
 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      17th May 2010
On Mon, 17 May 2010 15:17:01 -0700, Jake D <Jake (E-Mail Removed)>
wrote:

>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.

--

John W. Vinson [MVP]
 
Reply With Quote
 
 
 
 
Jake D
Guest
Posts: n/a
 
      18th May 2010
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" wrote:

> On Mon, 17 May 2010 15:17:01 -0700, Jake D <Jake (E-Mail Removed)>
> wrote:
>
> >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.
>
> --
>
> John W. Vinson [MVP]
> .
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I average hourly data into daily data? Lindsey Microsoft Excel Misc 1 30th Mar 2009 05:05 PM
How to plot hourly data =?Utf-8?B?bWp3ZWRla2luZw==?= Microsoft Excel Charting 6 14th Feb 2007 10:35 PM
How to convert half hourly data into hourly =?Utf-8?B?a2lwcGVycw==?= Microsoft Excel Misc 5 1st Feb 2007 11:27 AM
Scheduler for Hourly and Half-hourly tasks =?Utf-8?B?UnlhbiBDLg==?= Microsoft Windows 2000 File System 1 22nd Mar 2005 11:43 PM
Hourly Data Count?? Rog Microsoft Access Queries 6 3rd Nov 2004 09:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:08 PM.