I am trying to follow the tutorial at this link http://bost.ocks.org/mike/map/ I have followed every instruction exactly as listed so far but when I try to run the command found in the "#Converting Data" section to create the subunits.json file:
$ogr2ogr \ -f GeoJSON \ -where "ADM0_A3 IN ('GBR', 'IRL')" \ subunits.json \ ne_10m_admin_0_map_subunits.shp
I get the following error (others posted about a similar error where the existing file ne_10m_admin... could not be opened but I can't find anything on the GeoJSON issue below):
$ ogr2ogr \ -f GeoJSON \ -where "ADM0_A3 IN ('GBR', 'IRL')" \ subunits.json \ ne_10m_admin_0_map_subunits.shp
FAILURE:
Unable to open datasource `GeoJSON' with the following drivers.
-> ESRI Shapefile
-> MapInfo File
-> UK .NTF
-> SDTS
-> TIGER
-> S57
-> DGN
-> VRT
-> REC
-> Memory
-> BNA
-> CSV
-> GML
-> GPX
-> KML
-> GeoJSON
-> GMT
-> GPKG
-> SQLite
-> WAsP
-> PCIDSK
-> OpenFileGDB
-> XPlane
-> AVCBin
-> AVCE00
-> DXF
-> Geoconcept
-> GeoRSS
-> GPSTrackMaker
-> VFK
-> PGDump
-> OSM
-> GPSBabel
-> SUA
-> OpenAir
-> PDS
-> WFS
-> HTF
-> AeronavFAA
-> EDIGEO
-> GFT
-> GME
-> SVG
-> CouchDB
-> Idrisi
-> ARCGEN
-> SEGUKOOA
-> SEGY
-> XLS
-> ODS
-> XLSX
-> ElasticSearch
-> PDF
-> CartoDB
-> SXF
Solved this issue. It was a result of the topojson installation. Originally I installed with the command:
sudo npm install -g topojson
(also tried uninstalling and reinstalling with this command just incase)
Finally I uninstalled and reinstalled with the command:
sudo -H npm install -g topojson