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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With