ropensci / rnaturalearth

An R package to hold and facilitate interaction with natural earth map data :earth_africa:
http://ropensci.github.io/rnaturalearth/
Other
214 stars 24 forks source link

Provide updated data list #24

Open mps9506 opened 5 years ago

mps9506 commented 5 years ago

My suggestion is to use httr and the Github API to checking folders in the Natural Earth Repo.

andysouth commented 5 years ago

Thanks Michael, this looks really great ! I'm just reviewing it locally and found a couple of minor glitches in my existing code, somewhat at the edge of my git knowledge, will get back to you.

andysouth commented 5 years ago

Hi Michael, I've merged your code in with a few changes. I created a small script in https://github.com/ropensci/rnaturalearth/blob/master/data-raw/make_table_of_data_avail.r to use your function to create two tables stored in the package for the available layers and then output these in the intro vignette. This makes it a little easier for the user. I could still do with documenting it a little better. I haven't really used the metadata links that your function can get, partly because I couldn't work out how best to and partly I thought the user can go to them via the website. Would you like me to add you as a contributor to the package ? I'm very happy to. I'm open to any other suggestions you might have. Best wishes, Andy

mps9506 commented 5 years ago

That looks great. I am not sure how to best incorporate the metadata links from a documentation perspective either. My reasons for include were: 1) it is available for users to copy into a web browser, and 2) the link is available for users to programmatically include links to source data/citations on generated maps or reports.

It would be great to be included as a contributor. I think this is a very useful package and will see where else I can contribute. Cheers.