Skip to content

JuliaGeo/NaturalEarth.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NaturalEarth.jl

Stable Dev Build Status

This package provides a Julia interface to the Natural Earth dataset. The Natural Earth dataset is a public domain map dataset available at 1:10m, 1:50m, and 1:110 million scales. It is ideal for small-scale thematic mapping and for creating static maps and illustrations.

Currently, this package provides a single function, naturalearth, which fetches any .geojson file from this repository. The function returns a GeoJSON.FeatureCollection object.

The data is downloaded on demand and cached using Julia's scratch space system. This means that the first time you fetch a dataset, it will take a while to download, and you will need an internet connection. Subsequent calls will be much faster, even in a new session.

Quick start

You can install the Natural Earth package through the Julia package manager: using Pkg; Pkg.add("NaturalEarth"). The main entry point is the naturalearth(dataset, [scale]) function which returns a GeoJSON.FeatureCollection from GeoJSON.jl.

using NaturalEarth
naturalearth("admin_0_countries", 110) # this resolves to `ne_110m_admin_0_countries.geojson`
naturalearth("10m_admin_0_countries")  # this gets the 10m-scale, but explicitly

These return GeoJSON.FeatureCollections, which you can either use as-is or convert to DataFrames (by DataFrame(naturalearth(...))).

Acknowledgements

All datasets are provided by Natural Earth.

Initial development by Haakon Ludvig Langeland Ervik

About

Julia interface to Natural Earth data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages