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

Automate data list #25

Closed mps9506 closed 5 years ago

mps9506 commented 5 years ago

This pull request includes one user facing function and two internal functions that address #24

find_vector_data(scale = 10, category = "physical")

Two internal functions include: git_contents() and git_layer_names(). These functions are used to access the Github API, parse folders and files in the Natural Earth Github repo, and return lists used by find_vector_data()

git_contents() requires httr and jsonlite which are now included under Import in the DESCRIPTION file. pbapply is suggested, and displays a progress bar used in git_layer_names()