Convert between currencies of different years (to check inflation etc.): 5 USD 2008 in USD 1908 |
I might be cool if we could make that with Google Co-op. Better if Googlers implement that themselve :) |
After doing some research on CPI* and messing around, I present you: http://ihaochi.com/files/temp/inflation.html (there's a small Easter egg – a bit of dark humor actually, don't be offended – try a few times before looking into the source code :))
I am working on the Google Gadget (for Co-op) right now, will post it here when I am done :) My first GGadget so I will test it a bit first.
*Got the data from here: http://woodrow.mpls.frb.fed.us/research/data/us/calc/hist1800.cfm |
Haochi : can you handle regular expression with Co-Op? I don't think so. |
Oops, been looking at the wrong direction. :( Anywho, you can add that to iGoogle for now, I will work on the Co-Op later. http://www.google.com/ig/add?moduleurl=http%3A%2F%2Fhosting.gmodules.com%2Fig%2Fgadgets%2Ffile%2F116129117132940312692%2Fhistorical-USD-inflation.xml |
Haochi:
Thanks! You're great.
If you want ideas for further work, I have some ;) but, really, what you've done is fantastic. :)
And the easter egg... sad, funny and true at the same time! |
Neat! To optimize your interface perhaps make sure people know what to enter into the fields. Perhaps use one of those gray pre-filled data. At my first try I entered something like
"How much does $10 in EUR worth in 2005?" (which got "NaN") instead of "How much does $10 in 2002 worth in 2005?" |
http://www.google.com/coop/profile?user=011122700481536971285 The current format of query to trigger the Subscribed Link is "int USD in yyyy = ? USD in yyyy", the regex used in Co-op is [RE:(\d{1,20}) USD in (\d{4}) = \? USD in (\d{4})]
Suggestions welcome.
By the way, I couldn't quite figure out how to parse info from Subscribed Links to the gadget, anyone? :) |
Haochi:
Great, again.
> Suggestions welcome.
Extend to other currencies? E.g. [4 USD in 1850 = ? EUR in 2008] |