[Dclug] Spread Sheets Again!
Przemek Klosowski
przemek.klosowski at nist.gov
Mon Jan 10 16:14:35 EST 2011
On 01/10/2011 03:40 PM, Alan McConnell wrote:
> My question: do any of you use spread-sheets? what are they
> good for? Given a text file containing e.g. state by state
> census data:
> Alaska 200,000 300,000
> Arizona 3,000,000 4,000,000 etc
> with census data in 2000 in field B and in 2010 in field C,
> I or any of you could whip out a bash or Perl or awk script, or
> even a LISP program to compute the difference in the numbers,
> and the % increase. To do this in e.g. Gnumeric was very
> difficult to learn.
>
> But maybe there is arcana that escapes me. Maybe I'm thinking
> about spreadsheets and their use in totally the wrong way.
Spreadsheets are like candy: tasty and easy on your mouth but
ultimately bad for you. I use it all the time to get some data quickly,
do a simple processing and get a quick-and-dirty plot/overview.
Having said that, experience shows time and time again that anything
more demanding is better done in an array-crunching environment like
SciPy/NumPy or Octave/Matlab (or gdl/IDL or ...).
Your specific example is probably on the simple side. You provided cells
A1, A2 A3, B1 B2 B3. I think you want the expression =A3-A2 in
cell A4, and =a4/a2 in cell A5. The nice thing about spreadsheets is
that you can then copy the expressions in A4 and A5 to B4,B5 (or even to
the entire 2xN column B4:E5, and it'll modifiy your original expression
to follow the appropriate row number, so that after your copying you
will have '=B3-B2' in B4, etc.
One nice piece of interaction is that you can cut tabular data directly
from a web page in a browser, and paste them onto the spreadsheet,
and it should split them up and apportion among the spreadsheet cells.
In Perl/Lisp you'd have to write code to get and parse HTML.
More information about the Dclug
mailing list