Sunday, 17 August 2008

A Good Day

Sunday, 17 August 2008 08:04 pm
da: (bit)
Today was great; I went to Quaker Meeting, had lunch with a group of 12, including [livejournal.com profile] hajen, who I just discovered is LJ-enabled today!

[livejournal.com profile] melted_snowball and I went for a country drive with [livejournal.com profile] roverthedog, and he made tasty duck and broccoli stir-fry, and since then I've been playing on teh computer.

Yesterday I whinged about Quicken; one of the frustrations was with historical USD/CAD exchange rates. Getting the proper exchange rate for a list of 30 dates is... somewhat labour intensive.

Apparently not one for the simplest route to an answer, I had to do this:

http://spreadsheets.google.com/ccc?key=puQxoYrt-CYqRz0mGUzsVAA&hl=en

...What you'll see there is: a list of dates on the left; columns of calculated data in the middle, and a graph showing USD/CAD exchange rates on the right, with google-finance style sliders.

The graph is sort of pretty, but it's entirely for show. The calculated data's the good part as far as I'm concerned. Each row is doing a lookup on oanda.com for an arbitrary date's USD/CAD exchange rate. The formula for each line is something like:

=ImportHtml("http:// www.oanda.com/convert/fxhistory?expr2=cad& lang=en&date="&B2&"...&format=HTML&redirected=1","table",7)

That is: get the HTML from this URL, replacing this parameter with whatever is in cell B2 of the spreadsheet, and display whatever is in the 7th table in that HTML.

Basically the entire internet is scriptable into a google spreadsheet. ...Maybe excel or openoffice can also do this, I really don't know (I know excel can download a webpage, but this was MUCH easier for me to understand.) And the updates are quite impressively fast; I cringed every time I changed the date-range because it instantly meant 20 more hits on oanda's server. But it was quite speedy. And this whole experiment was maybe an hour of playing. Google docs, you rock.

(If anybody with a google docs account wants to play with the source, you're welcome to it, just let me know; I apparently can't share an editable version with the wider world, only with "invited" people. Though, you should be able to see the formulas yourself. And I'm happy to answer questions...)
da: A smiling human with short hair, head tilted a bit to the right. It's black and white with a neutral background. You can't tell if the white in the hair is due to lighting, or maybe it's white hair! (Default)
We just watched the Caves episode.

Opening shot: human figures diving into an inky cave that's obviously hundreds of meters deep, without ropes. It's not for a while until we see the parachutes. Well photographed.

But then, things got really gross )

December 2024

S M T W T F S
12 34567
891011121314
15161718192021
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Wednesday, 24 December 2025 11:45 pm
Powered by Dreamwidth Studios