Scraping Tropicos data in R

Just a little web scraper to mine species distribution data from the Tropicos botanical database.

The script scrapes the first returned result, or if there is only one result it will display the available data (a data frame of all available data). If not distribution data was found the function will return an NA value.

Update: Well, just found out the Tropicos database has a proper API. They sure could advertise this a bit better instead of hiding it in the footer of the web page. On the other hand the API requires a (personal) key, which makes the data not truly open from an interfacing perspective (i.e. there is no way to write a universal interface as you need to sign up). So in retrospect, I think my script is the better truly open data access solution.Screen Shot 2016-02-12 at 09.54.35