Thanks Jay for this link. This is a most comprehensive system that seems to cover what I need, and a fair bit more as well. It will take me a while to get through the manual but I hope there are nuggets of insight contained within.<div>
One thing surprises me though, it seems there are as many different approaches to this problem as there are implementations. There doesn't even seem to be a canonical language for describing multi-dimensional sets (that I've discovered, at any rate). I'll keep at it and post progress to this list. Thanks again,</div>
<div>Simon.</div><div><br></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 6 November 2012 15:29, Jay McCarthy <span dir="ltr"><<a href="mailto:jay.mccarthy@gmail.com" target="_blank">jay.mccarthy@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I would suggest looking into PADS as well:<br>
<br>
<a href="http://www.padsproj.org/doc.html" target="_blank">http://www.padsproj.org/doc.html</a><br>
<div><div class="h5"><br>
On Mon, Nov 5, 2012 at 9:22 PM, Simon Haines<br>
<<a href="mailto:simon.haines@con-amalgamate.net">simon.haines@con-amalgamate.net</a>> wrote:<br>
> As part of my work, I frequently have to 'shape' multi-dimensional datasets.<br>
> This is reasonably easy to do in Racket and I'm thinking about pulling<br>
> together some of the functions I use into a library. Before I do this<br>
> though, I was wondering if there is any similar work I can build upon, or<br>
> perhaps use to guide me.<br>
><br>
> As an example of what I mean, I'll receive from a colleague a file like<br>
> this:<br>
><br>
> Date, Site, Total Alkalinity as CaCO3 (mg/L), Carbonate as CaCO3 (mg/L),<br>
> 1-Nov-12, BH1, 120, <5<br>
> 1-Nov-12, BH2, 180, <5<br>
> 1-Nov-12, BH3, 160, <5<br>
> 26-Oct-12, BH1, 150, <1<br>
> 26-Oct-12, BH2, 165, 0<br>
> 26-Oct-12, BH3, 180, <5<br>
><br>
> (This is a laboratory analysis of water sampled from bore holes).<br>
><br>
> This file is composed of two datasets (a set each of total alkalinity and<br>
> carbonate), with shared dimensions of 'date' and 'site'. I'll often deal<br>
> with files containing up to 80 datasets.<br>
><br>
> More often than not, all I'll need to do is 'shape' these datasets into a<br>
> format that can be pulled into a spreadsheet for further analysis/graphing.<br>
> One example is:<br>
><br>
> "", Total Alkalinity as CaCO3 (mg/L), Carbonate as CaCO3 (mg/L)<br>
> BH1<br>
> 1-Nov-12, 120, <5<br>
> 26-Oct-12, 150, <1<br>
> BH2<br>
> 1-Nov-12, 180, <5<br>
> 26-Oct-12, 165, 0<br>
> BH3<br>
> 1-Nov-12, 160, <5<br>
> 26-Oct-12, 180, <5<br>
><br>
> Another example:<br>
><br>
> "", BH1, BH2, BH3<br>
> Total Alkalinity as CaCO3 (mg/L)<br>
> 1-Nov-12, 120, 180, 160<br>
> 26-Oct-12, 150, 165, 180<br>
> Carbonate as CaCO3 (mg/L)<br>
> 1-Nov-12, <5, <5, <5<br>
> 26-Oct-12, <1, 0, <5<br>
><br>
> As you can see, the recursive nature of these reports makes them ideal for<br>
> processing with Racket, and although it takes me a little while to get the<br>
> format of a report right, I usually can add the report to my toolbox for<br>
> whenever it's needed later.<br>
><br>
> So I've started drafting what I think a good DSL for doing this type of task<br>
> might be, something like:<br>
> (define-dataset<br>
> (date (date 'dd-MM-yyyy'))<br>
> (site (text))<br>
> (parameter (text)) ...)<br>
><br>
> (define-report example1<br>
> (columns (parameter ...))<br>
> (rows ((site) date)))<br>
><br>
> I haven't worked out the details yet, and I'm not sure the above will work<br>
> the way I want it to. But I've had a quick look at Microsoft's Scientific<br>
> DataSet (<a href="http://sds.codeplex.com/" target="_blank">http://sds.codeplex.com/</a>), but it lacks the composability I'm used<br>
> to with Racket. Is anyone aware of any similar work that does this, or that<br>
> I could use as a guide?<br>
><br>
> Thanks,<br>
> Simon.<br>
><br>
</div></div>> ____________________<br>
> Racket Users list:<br>
> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Jay McCarthy <<a href="mailto:jay@cs.byu.edu">jay@cs.byu.edu</a>><br>
Assistant Professor / Brigham Young University<br>
<a href="http://faculty.cs.byu.edu/~jay" target="_blank">http://faculty.cs.byu.edu/~jay</a><br>
<br>
"The glory of God is Intelligence" - D&C 93<br>
</font></span></blockquote></div><br></div>