Skip to main content

Render xarray timestacks into GIFs

Project description

GeoGIF

Documentation Status

Make GIFs from time-stacked xarray.DataArrays (time, [optional band], y, x), dead-simple.

from geogif import gif, dgif
gif(data_array)
dgif(dask_data_array).compute()

Animation of shoreline moving on the coast of Cape Cod

The "geo" part is a lie, actually. The arrays don't have to be geospatial in nature. But I called it GeoGIF because:

  1. Wanting to animate a time-stack of imagery (like you'd get from stackstac) is a common task in the earth-observation/geospatial world.
  2. I think GeoGIF is a hilarious idea1.

1: To ruin the joke, it sounds like GeoTIFF, a ubiquitous geospatial image format. If you also think this is a funny idea, and believe you'd have a better use for the name than I do, I'd happily cede it to you.

Installation

pip install geogif

Documentation

See https://geogif.readthedocs.io/en/latest/.

Development

GeoGIF is managed by Poetry, so be sure that's installed first. To develop locally, first fork or clone the repo. Then, to set up a virtual environment and install the necessary dependencies:

cd geogif
poetry install

Running Tests

GeoGIF has some basic end-to-end tests, written with Hypothesis. To run:

pytest

This will take ~30 seconds (longer the first time), as Hypothesis generates fake data to root out possible errors.

Code style

GeoGIF is formatted with shed, in order to allow for as few opinions as possible.

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

geogif-0.3.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

geogif-0.3-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file geogif-0.3.tar.gz.

File metadata

  • Download URL: geogif-0.3.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.12.8 Darwin/24.2.0

File hashes

Hashes for geogif-0.3.tar.gz
Algorithm Hash digest
SHA256 559ad993d8cb9d4c86347a75aae9c38ec920a273abf9b29cba14ed1264dc143d
MD5 325e63b89dfde7b495b4c506d40ef96a
BLAKE2b-256 a1c16e1fdf9339ae7e211e2b22c9fa9c07ff1653d208de8fb329cc404d95e6d0

See more details on using hashes here.

File details

Details for the file geogif-0.3-py3-none-any.whl.

File metadata

  • Download URL: geogif-0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.12.8 Darwin/24.2.0

File hashes

Hashes for geogif-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8af0ad05a5e87d315d2bd56390d4aecddc9eecc5a3ee062cb6b63a7b765f989d
MD5 419f7e1a3fda6a8ee9629300138162f4
BLAKE2b-256 1332a2d6608ae23970b3cd84fa74201a40d68bc9ab93f08c38a64ee63f4cac4f

See more details on using hashes here.

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