Comments on: No, this isn't about EVE Online.
http://ask.metafilter.com/236220/No-this-isnt-about-EVE-Online/
Comments on Ask MetaFilter post No, this isn't about EVE Online.Thu, 28 Feb 2013 05:59:22 -0800Thu, 28 Feb 2013 06:07:01 -0800en-ushttp://blogs.law.harvard.edu/tech/rss60Question: No, this isn't about EVE Online.
http://ask.metafilter.com/236220/No-this-isnt-about-EVE-Online
I need help taming a very long list of numbers into useful tabulated data, in Excel. <br /><br /> I have an Excel spreadsheet. It consists of a single column with 8,784 rows. Each cell contains a number. That number represents a data value corresponding to an hour from 2012. The data values are in order, starting at midnight Jan 1, and going to midnight Dec 31.<br>
<br>
I need to turn this mess into a 12x24 table representing average hourly values for each month. My Excel-fu is weak.<br>
<br>
The best way I currently know to do this is to just type a series of very long functions like: <strong>=Average(A1, A25, A49,A73 ...)</strong><br>
<br>
This is obviously not the right way. So, what's the right way?post:ask.metafilter.com,2013:site.236220Thu, 28 Feb 2013 05:59:22 -0800256excelspreadsheetsresolvedBy: Aizkolari
http://ask.metafilter.com/236220/No-this-isnt-about-EVE-Online#3422949
What exactly do you want in the 12x24 table? Is it the count of date values per hour of the day per month?comment:ask.metafilter.com,2013:site.236220-3422949Thu, 28 Feb 2013 06:07:01 -0800AizkolariBy: Aizkolari
http://ask.metafilter.com/236220/No-this-isnt-about-EVE-Online#3422958
Here's what you do. Make two more columns to the right of your data. Call one Hour and one Month. Then use the =hour() and =month() functions in excel to extract the hour and month from your data. Then use a pivot table to pull it all into a 12x24 table with the months on the rows, the hours on the columns, and the average of your data as the value.<br>
<br>
If you can post a link with sample data for one month I can demo this for you.comment:ask.metafilter.com,2013:site.236220-3422958Thu, 28 Feb 2013 06:17:37 -0800AizkolariBy: MuffinMan
http://ask.metafilter.com/236220/No-this-isnt-about-EVE-Online#3422988
What Aizkolari says. This is what pivot tables are for. Insert a column. Add the month. Insert another column. Add the hour. You can use a formula for the hours because you know they come in blocks of 24. Then pivot it so you have the months down the vertical axis and hours on the horizontal. Or vice versa. Then choose "average" rather than sum or count for the calculation of your data.comment:ask.metafilter.com,2013:site.236220-3422988Thu, 28 Feb 2013 06:41:33 -0800MuffinManBy: 256
http://ask.metafilter.com/236220/No-this-isnt-about-EVE-Online#3423006
<a href="http://256k.org/duff/january.xlsx">So here's January</a>.<br>
<br>
I have googled "excel pivot table" and am reading the tutorial now. But any more specific help would be super useful.<br>
<br>
And to clear, what I need is a table where the first column contains values like "Average hour 1 value in January," "Average hour 2 value in January" and then the second column contains values like "Average hour 1 value in February," "Average hour 2 value in February"comment:ask.metafilter.com,2013:site.236220-3423006Thu, 28 Feb 2013 06:52:33 -0800256By: 256
http://ask.metafilter.com/236220/No-this-isnt-about-EVE-Online#3423022
Okay.... So I see how pivot tables are what I need, but it seems that, in order to use them, I would need to create one column that counted from 1 to 24 over and over again, and then another column that said "January" 744 times, followed by "February" 696 times, etc. Correct?<br>
<br>
This is what you are getting at with the hour() and month() suggestion, I think, but I'm having trouble making that work.comment:ask.metafilter.com,2013:site.236220-3423022Thu, 28 Feb 2013 07:04:50 -0800256By: flabdablet
http://ask.metafilter.com/236220/No-this-isnt-about-EVE-Online#3423027
What kind of trouble?comment:ask.metafilter.com,2013:site.236220-3423027Thu, 28 Feb 2013 07:08:10 -0800flabdabletBy: 256
http://ask.metafilter.com/236220/No-this-isnt-about-EVE-Online#3423039
Well, my googling suggests that the hour() function is used for turning times into hour integers, like <strong>=HOUR(TIMEVALUE("1:00 PM"))</strong> returns <strong>13</strong>. I just don't see how I use that function to generate the 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,1,2... that I need to populate column B with.<br>
<br>
Sorry, I know this is very entry level Excel stuff.comment:ask.metafilter.com,2013:site.236220-3423039Thu, 28 Feb 2013 07:13:03 -0800256By: Aizkolari
http://ask.metafilter.com/236220/No-this-isnt-about-EVE-Online#3423069
Ok, so you need to add a third extra column with datetime info autofilled in for the whole year. <a href="http://www.2shared.com/file/bGJnFdv3/Excel_Help.html">Here</a> is a mockup I did with some fake data for a few extra months. To get the datetime autofill started, I typed in 1/1/2012 00:00, 1/1/2012 01:00, 1/1/2012 02:00 in the first three cells of column B and then it autofilled the rest of the way down. Same for the Hour and Month columns. The pivot table is easy too; just insert it, put the months on rows and hours on columns with Value in the Values, and then go to Value Field Settings on your Value and set it to Average rather than sum.comment:ask.metafilter.com,2013:site.236220-3423069Thu, 28 Feb 2013 07:29:37 -0800AizkolariBy: 256
http://ask.metafilter.com/236220/No-this-isnt-about-EVE-Online#3423094
Woo! It worked!<br>
<br>
These pivot table things seem useful....comment:ask.metafilter.com,2013:site.236220-3423094Thu, 28 Feb 2013 07:49:33 -0800256By: scruss
http://ask.metafilter.com/236220/No-this-isnt-about-EVE-Online#3423098
Excel isn't very hot on the 1..24 hour format used in most data logging applications, so your first/last hours of every month with belong to the wrong month. This might matter in your application.<br>
<br>
Personally, I build two hash tables - the sum for each month, and the count for each month - then calculate the mean as <em>sum[month]/count[month]</em> for each month. I use whatever scripting language is handy, and I very rarely use any standard time library as they force 0..23 hour notation.comment:ask.metafilter.com,2013:site.236220-3423098Thu, 28 Feb 2013 07:52:50 -0800scruss