Download OpenStreetMap from https://download.geofabrik.de/.

No external dependencies! Pure R!

Install

remotes::install_github("ibarraespinosa/geofabrik")
# install.packages("geofabrik") #soon

Use

head(urlgeo)
get_osm("Sao Tome and Principe")
get_osm("Sao Tome and Principe", "pbf")
get_osm("Sao Tome and Principe", "osm")