Skip to main content

shapeography

Alt text Alt text

Conda Recipe Conda Version PyPI Conda Platforms Anaconda-Server Badge Anaconda-Server Badge Anaconda-Server Badge DOI

Anaconda Downloads:

Conda Downloads

PIP Downloads:

PyPI - Downloads

(C) Eric J. Drewitz 2026

An open-source Python package that manages shapefiles/GEOJSON files and simplifies the process of working with GIS data in Python.

How To Install

Copy and paste either command into your terminal or anaconda prompt:

Install via Anaconda

conda install shapeography

Install via pip

pip install shapeography

How To Update To The Latest Version

Copy and paste either command into your terminal or anaconda prompt:

Update via Anaconda

This is for users who initially installed shapeography through Anaconda

conda update shapeography

Update via pip

This is for users who initially installed shapeography through pip

pip install --upgrade shapeography

Jupyter Lab Examples

  1. Downloading and Plotting the National Weather Service Public Forecast Zones
  2. Downloading and Plotting the NOAA/NWS Climate Prediction Center 6-10 Day Probabilistic Precipitation Outlook
  3. Downloading and Plotting the Bureau of Land Management Unallocated Lands GEOJSON

Client Module

Documentation

The client module hosts the client functions get_shapefiles() and get_geojson() that download shapefiles/GEOJSON file from a user-defined URL address into a folder locally on your PC.

The user must specify the path and filename and the file is saved to {path}/{filename}.

This client is also helpful for those using shapeography in automated scripts. If the user keeps the optional argument refresh=True - The directory hosting the shapefiles/GEOJSON file will be refreshed as the old files will be deleted and new files downloaded. This can be helpful in automation due to periodic shapefile updates on the server-side as it ensures that the user will always have the most recent and up to date shapefiles/GEOJSON file.

This client supports users on a VPN/PROXY connection.

**Proxy Example**

proxies=None ---> proxies={
                           'http':'http://your-proxy-address:port',
                           'https':'http://your-proxy-address:port'
                           }

shapeography.client.get_shapefiles(url, path, filename, proxies=proxies)

Unzip Module

Documentation

The unzip module hosts the function that unzips the shapefiles/GEOJSON file if the file(s) need to be unzipped.

In nearly all cases, shapefile components are within a zipfile server-side so needing to unzip is very common.

The function extract_files() unzips the shapefiles/GEOJSON into a user-specified extraction folder that is automatically generated.

Supports the following file extentions: .zip, .gz, .tar, .tar.gz

Geometry Module

Documentation

The geometry module hosts functions that extract data from these shapefiles/GEOJSON file and make it significantly easier to work with this data in Python.

The current functions are:

  1. cartopy_shapefeature() - Returns a cartopy.shapefeature from the data inside the shapefile/GEOJSON.
  2. get_geometries() - Returns a gpd.GeoDataFrame of the geometry data of the shapefile/GEOJSON in the coordinate reference system (CRS) specified by the user. (Default CRS = 'EPSG:4326' --> ccrs.PlateCarree())
  3. geodataframe() - Returns gpd.GeoDataFrame hosting all the data in the shapefile/GEOJSON in the coordinate reference system (CRS) specified by the user. (Default CRS = 'EPSG:4326' --> ccrs.PlateCarree())

Citations

  1. cartopy: Phil Elson, Elliott Sales de Andrade, Greg Lucas, Ryan May, Richard Hattersley, Ed Campbell, Andrew Dawson, Bill Little, Stephane Raynaud, scmc72, Alan D. Snow, Ruth Comer, Kevin Donkers, Byron Blay, Peter Killick, Nat Wilson, Patrick Peglar, lgolston, lbdreyer, … Chris Havlin. (2023). SciTools/cartopy: v0.22.0 (v0.22.0). Zenodo. https://doi.org/10.5281/zenodo.8216315
  2. geopandas: Kelsey Jordahl, Joris Van den Bossche, Martin Fleischmann, Jacob Wasserman, James McBride, Jeffrey Gerard, … François Leblanc. (2020, July 15). geopandas/geopandas: v0.8.1 (Version v0.8.1). Zenodo. http://doi.org/10.5281/zenodo.3946761
  3. requests: K. Reitz, "Requests: HTTP for Humans". Available: https://requests.readthedocs.io/.

Metadata

Release files for shapeography 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shapeography 1.2
File Size Uploaded
shapeography-1.2.tar.gz 10.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shapeography 1.2
File Interpreter ABI Platform
shapeography-1.2-py3-none-any.whl Python 3 none any Details

Total release size: 19.1 kB

Release files / shapeography-1.2.tar.gz

Download URL shapeography-1.2.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d215c5706577771a4d48ac2d1029eb57228dbb197ee0686d0ae8ea6bd27b6125
BLAKE2b-256 checksum
How to use checksums
5548deb8a1ded339c7521bc7bb062dcac28f4a0156f37fad8ec36e384b1b20f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.7

Release files / shapeography-1.2-py3-none-any.whl

Download URL shapeography-1.2-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0fa0cfa4a52bfdf0bd5bb2ab57640abc275b6a89dc9691c6221fa3cbbb1367a6
BLAKE2b-256 checksum
How to use checksums
1f6ae16d3f413a6b8ff74534bb2de657d602e5f4d7c848d5ba3f720448ff2599
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

1.2 This release

2 release files

1.1

2 release files

1.0

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page