Convert various data formats to GeoJSON or TopoJSON
This package is a utility to convert geographic data to GeoJSON and TopoJSON formats. Nothing else. We hope to do this one job very well, and handle all reasonable use cases.
Functions in this package are organized first around what you’re working with or want to get, GeoJSON or TopoJSON, then convert to or read from various formats:
topojson_list()- convert to GeoJSON/TopoJSON as R list format
topojson_json()- convert to GeoJSON/TopoJSON as JSON
geojson_sp()- convert output of
geojson_sf()- convert output of
topojson_read()- read a GeoJSON/TopoJSON file from file path or URL
topojson_write()- write a GeoJSON/TopoJSON file locally
Each of the above functions have methods for various objects/classes,
map_gist()- push up a GeoJSON or topojson file as a GitHub gist (renders as an interactive map)
map_leaf()- create a local interactive map using the
GDAL on the command line first, e.g., using
brew install gdal
Get deps first
remotes::system_requirements("ubuntu", "20.04", package = "geojsonio") #>  "apt-get install -y make" #>  "apt-get install -y libssl-dev" #>  "apt-get install -y libgdal-dev" #>  "apt-get install -y gdal-bin" #>  "apt-get install -y libgeos-dev" #>  "apt-get install -y libproj-dev" #>  "apt-get install -y libsqlite3-dev" #>  "apt-get install -y libudunits2-dev" #>  "apt-get install -y libprotobuf-dev" #>  "apt-get install -y protobuf-compiler" #>  "apt-get install -y libcurl4-openssl-dev" #>  "apt-get install -y libnode-dev" #>  "apt-get install -y libjq-dev"
Stable version from CRAN
Or development version from GitHub
What’s the future of geojsonio?
geojsonio is stable and we expect it to stay on CRAN. The package is a dependency for a number of other packages and is downloaded tens of thousands of times per month; moving forward the priority with this package is to make sure that those packages and users are able to keep using the package.
That said, we do not anticipate much further development; there will not likely be many major new features added or new interfaces developed. We’ll avoid making breaking changes as much as possible.
If you find bugs in geojsonio or want to contribute new features: please feel free to submit PRs! So long as the existing interface stays intact, we’d be more than happy to make the package more useful for you. That said, we don’t anticipate being particularly responsive to feature requests (without a matching PR) moving forward.