in reply to Re: Invert a hash... not a FAQ (I hope)
in thread Invert a hash... not a FAQ (I hope)
Here is an example of what I'm doing. I'm downloading very detailed information on the wholesale price of electricity. In my market, there is an individual price for each of several thousand nodes in the market, and there is a separate price for each hour, and in the "real-time" market, for every five minutes.
The data comes in flat CSV files for each day that look like
node,hour,interval,price bob,3,4,45.64 ...
I frequently need to generate reports from this data such as:
In general, what I do is load up the data I'm interested in and plop it into a hash of hashes of hashes ... that is organized most conveniently for the burning management question du jour, but then the next day, a different question would be easier to calculate with a different arrangement. Often, these analyses get accreted into a daily report generated by one script, but I'm trying to minimize the amount of shuffling going on.
Run-time is an issue, but size is usually a bigger problem.
dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Invert a hash... not a FAQ (I hope)
by tilly (Archbishop) on Jan 22, 2009 at 01:43 UTC | |
by djacobow (Initiate) on Jan 22, 2009 at 02:01 UTC | |
by tilly (Archbishop) on Jan 22, 2009 at 02:24 UTC | |
by Jenda (Abbot) on Jan 22, 2009 at 02:22 UTC | |
by jhourcle (Prior) on Jan 22, 2009 at 15:10 UTC | |
|
Re^3: Invert a hash... not a FAQ (I hope)
by kyle (Abbot) on Jan 22, 2009 at 01:59 UTC |