Code: parsing Slovenian exchange rate data

January 30, 2011
By

(This article was first published on Left Censored » R, and kindly contributed to R-bloggers)

Some time ago I found myself in need of daily exchange rates for the Slovenian Tolar (though I can’t now remember why). Unfortunately, I wasn’t able to find the data in a readily usable format at the Bank of Slovenia website and had to instead use the XML file they provide. Since the XML file is in Slovenian, and because the file is somewhat large, I wasn’t able to extract the data with any of the usual tools (Gnumeric, Firefox, etc.). The file linked to below contains an R script I wrote to extract the data. It’s the first time I have had to parse XML files, and it’s certainly not the most efficient method of dealing with the data, but it gets the job done. In retrospect, I probably should have used Python.

To leave a comment for the author, please follow the link and comment on his blog: Left Censored » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: ,

Comments are closed.