Skip to main content

A simple loader for Natural Earth map data.

Project description

NE Loader

CI

A simple, robust Python package to download and load Natural Earth map data using GeoPandas.

Features

  • Download and cache Natural Earth datasets
  • Load shapefiles as GeoDataFrames

Installation

pip install ne-loader

Usage

from ne_loader import map_loader
world = map_loader.get_natural_earth('cultural', 'admin_0_countries')

Errors are raised by default. To return the caught exception instead:

result = map_loader.get_natural_earth(
    'cultural',
    'admin_0_countries',
    error_mode='return',
)

CLI

ne-loader --help

To set an environment override for the NE data save path:

export NATURAL_EARTH_CACHE_DIR="..."

Some commands include:
List cached datasets.

ne-loader list

Query where the cached datasets are.
If you change NATURAL_EARTH_CACHE_DIR, the command shows the active cache path for the current environment.

ne-loader where

Download a Natural Earth Dataset. Default resolution is 10m.

ne-loader download {category} {name} --res {res}

Example usage to download 10m_admin_0_countries

ne-loader download cultural admin_0_countries

Delete either one dataset or all, from current cache directory.

ne-loader rm {dataset}
# or
ne-loader rm --all

Tests

python3 -m pytest tests

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ne_loader-0.4.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ne_loader-0.4-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file ne_loader-0.4.tar.gz.

File metadata

  • Download URL: ne_loader-0.4.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ne_loader-0.4.tar.gz
Algorithm Hash digest
SHA256 3d7c2a260a3b5683a39336189c4adfff8ec1b204e8ca3a8a3172e52100a49fd9
MD5 3a9ef34057687e00edbda560eb63762c
BLAKE2b-256 5d73ee1176645f0038f4dace0de4236a84e9019c9a8a537c0689ae8f9e450588

See more details on using hashes here.

Provenance

The following attestation bundles were made for ne_loader-0.4.tar.gz:

Publisher: publish.yml on erictunn/NE_loader_package

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ne_loader-0.4-py3-none-any.whl.

File metadata

  • Download URL: ne_loader-0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ne_loader-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a403e1c5f8a0d227c5a7c3b08f9789377f260865e01f591b3203235466e76aa2
MD5 2619b08123dfc213a2fc2b86b8e422fa
BLAKE2b-256 861457cac968997097fcc66f16e1f9ccde2689a9f10896f7f76cd8b813ce0020

See more details on using hashes here.

Provenance

The following attestation bundles were made for ne_loader-0.4-py3-none-any.whl:

Publisher: publish.yml on erictunn/NE_loader_package

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page