Is it possible to read geoJSON or topoJSON file in R to draw a choropleth map?

倖福魔咒の 提交于 2019-11-27 14:21:09
Spacedman

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!