I'm pretty new to using rgdal
so I'm hoping this is something simple that I'm missing, but I've been googling around about it for a few hours and I can't figure out the issue.
Basically I'm trying to make a leaflet map in a shiny app, but I'm getting snarled right at the beginning, trying to load country data like so:
library(rgdal)
countries <- readOGR("https://raw.githubusercontent.com/datasets/geo boundaries-world-110m/master/countries.geojson", "OGRGeoJSON")
but every time I get the following error:
Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv, :
Cannot open file
I've gone to the address and I see the raw geojson file there, so it's not a missing file. I've also downloaded the file manually into a data folder and then tried to access it with
countries <- readOGR("data/countries.geojson", "OGRGeoJSON")
and I get the same error. Any ideas would be much appreciated.
I'm running R on Windows 7.