Open josoga2 opened 2 years ago
Hi @josoga2
The map_ng
function returns a list as specified in ?maps::map
.. The documentation says this about the return value:
The return value is a list with x, y, range, and names components. This object can be used as a database for successive calls to map and functions. If fill is FALSE, the x and y vectors are the coordinates of successive polylines, separated by NAs. If fill is TRUE, the x and y vectors have coordinates of successive polygons, again separated by NAs. Thus the return value can be handed directly to lines or polygon, as appropriate
I think tmaps expects "simple feature" objects, so if you work with the sf
package, I suppose you can use this list to create objects that can be passed on to tmaps. Although the naijR package is not strictly designed for geospatial analyses, one can look into providing richer objects in future.
Hello @BroVic , Just out of curiosity, is it possible to get the geometry data for state-level data for later use with tmaps? I specified tmaps because of its interactive mode.