Useful Currency Information by Accident

Pennies and Pounds If you run a website, have you ever noticed how much data it accumulates? Usually, quite by accident as well… I was poking through some old parts of the VenueMirror website today and stumbled across a feature that I had totally forgotten we had implemented. It is of course one of those features that the code makes use of everyday, but it has become so inherent that it gets taken for granted!

There is a need for our system to perform currency conversions as transactions can take place across multiple currencies, and so currency updater was created to provide live exchange rates. Our currency updater is quietly used by our currency and transaction objects, and so once built there’s very little need for us to even think about how it works! Essentially it collects the latest currency conversion rates and builds a currency table for the whole system to use. In the process though, it has collected historical currency data.

So I thought it would be interesting to render this data into charts that show how exchange rates fluctuate. I built a quick bit of PHP to take daily spot rates out of the data at 11.30am and see how they compared to the previous days! The images below are dynamic PHP images, and should show you exchange rates for ten days started from 25 days before yesterday!




The script takes parameters that allows it to be customised on how many data points it shows, which currencies it compares, and how many days into the past it should end. Tomorrow, I’ll post the source to the graphing code, and the tutorials that are available online for you to get more information from.

Cheers,
K
P.S: Thanks to Mukumbura for the opening photo!

Share on Facebook

Tags: , , , , , ,

Facebook comments:

One Response to “Useful Currency Information by Accident”

  1. abhi says:

    haha neat !
    overlay this with geopolitical news and events and it all makes sense !

Leave a Reply