topoJSON
and geoJSON
files are know very common for drawing maps on the internet. Is it possible to import them in R
to draw choropleth maps?
Get the rgdal
package installed. Then if:
library(rgdal)
> "GeoJSON" %in% ogrDrivers()$name
[1] TRUE
then you can do something like:
> map = readOGR("foo.json", "OGRGeoJSON")
> plot(map)
But you need GeoJSON support in your ogrDrivers
list.