Question

I'm trying to write some programs to download a lot of economic data (on the order of hundreds of distinct tables from different websites, that'd need to be updated frequently). Take this website:

http://www.oecd-ilibrary.org/economics/country-statistical-profiles-key-tables-from-oecd_20752288

I want an R program to be able to click on one of those little green buttons that will download an xls file, so I don't have to click it by hand. Is there a package / function in R for this type of thing? (And if not, is there another simple-ish way to do it?)

Thanks!

Était-ce utile?

La solution

The buttons just link to .xls files. So, you could use the URL of the page that the button points to, and use that URL as an input to a script / function that does the scraping. There are plenty of packages like rcurl that you could use to manage the download.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top