Code: parsing Slovenian exchange rate data
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
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.
- Script: ConvertSIT
- Data source: Bank of Slovenia
- Data: Daily Tolar exchange rates (2001-2006)
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.