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

Overview

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 -E tests -E docs

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.

Comments
  • Bump pillow from 9.0.0 to 9.0.1

    Bump pillow from 9.0.0 to 9.0.1

    Bumps pillow from 9.0.0 to 9.0.1.

    Release notes

    Sourced from pillow's releases.

    9.0.1

    https://pillow.readthedocs.io/en/stable/releasenotes/9.0.1.html

    Changes

    • In show_file, use os.remove to remove temporary images. CVE-2022-24303 #6010 [@​radarhere, @​hugovk]
    • Restrict builtins within lambdas for ImageMath.eval. CVE-2022-22817 #6009 [radarhere]
    Changelog

    Sourced from pillow's changelog.

    9.0.1 (2022-02-03)

    • In show_file, use os.remove to remove temporary images. CVE-2022-24303 #6010 [radarhere, hugovk]

    • Restrict builtins within lambdas for ImageMath.eval. CVE-2022-22817 #6009 [radarhere]

    Commits
    • 6deac9e 9.0.1 version bump
    • c04d812 Update CHANGES.rst [ci skip]
    • 4fabec3 Added release notes for 9.0.1
    • 02affaa Added delay after opening image with xdg-open
    • ca0b585 Updated formatting
    • 427221e In show_file, use os.remove to remove temporary images
    • c930be0 Restrict builtins within lambdas for ImageMath.eval
    • 75b69dd Dont need to pin for GHA
    • cd938a7 Autolink CWE numbers with sphinx-issues
    • 2e9c461 Add CVE IDs
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • please remove python version limit

    please remove python version limit

    hi,

    looks like great tool! I tried to install it using pip, but got error: ERROR: Package 'geogif-0.1.2' requires a different Python: 3.7.6 not in '>=3.8,<4.0'

    could you please remove the strict dependency on python 3.7.6 ?

    thank you

    opened by espiritocz 1
  • Bump Pillow to 9.0, support 2022 Dask

    Bump Pillow to 9.0, support 2022 Dask

    Bump Pillow to 9.0 due to multiple vulnerabilities: https://github.com/advisories/GHSA-xrcv-f9gm-v42c, https://github.com/advisories/GHSA-8vj2-vxx3-667w, https://github.com/advisories/GHSA-pw3c-h7wp-cvhx

    Closes #4

    opened by gjoseph92 0
  • Support dask>=2022

    Support dask>=2022

    Our dask dependency won't allow us to go beyond 2021: https://github.com/gjoseph92/stackstac/blob/b1172defb8dc30c8502316f73228a42428f76753/pyproject.toml#L18

    Bump this and cut a release.

    opened by gjoseph92 0
  • Loosen version restrictions

    Loosen version restrictions

    Necessary for https://github.com/gjoseph92/stackstac/issues/51. We have to do a crazy dance because of https://github.com/python-poetry/poetry/issues/697.

    This lockfile is out of date. I've manually overridden pyproject.toml to an unsolveable state in order to bump the xarray version and cut a release. This will be resolved in a future commit.

    opened by gjoseph92 0
  • CLI Execution

    CLI Execution

    This is super slick! I love how quick and easy it is. Any interest in an install-able little executable we could just run from the CLI?

    geogif ./my_data.nc:TMP_2M ./out.gif

    Something like that?

    opened by four43 2
Releases(v0.1.3)
  • v0.1.3(Mar 17, 2022)

    Changelog: https://github.com/gjoseph92/geogif/blob/main/CHANGELOG.md#013-2022-03-16

    Full Changelog: https://github.com/gjoseph92/geogif/compare/v0.1.2...v0.1.3

    Source code(tar.gz)
    Source code(zip)
  • v0.1.2(Jan 20, 2022)

A script to generate a profile picture and a banner that show the same image on Discord.

Discord profile picture & banner generator A script to generate a profile picture and a banner that show the same image on Discord. Installation / Upd

Victor B. 9 Nov 27, 2022
Convert HDR photos taken by iPhone 12 (or later) to regular HDR images

heif-hdrgainmap-decode Convert HDR photos taken by iPhone 12 (or later) to regular HDR images. Installation First, make sure you have the following pa

Star Brilliant 5 Nov 13, 2022
A SIXEL encoder/decoder implementation derived from kmiya's sixel

libsixel What is this? This package provides encoder/decoder implementation for DEC SIXEL graphics, and some converter programs. (https://youtu.be/0Sa

Hayaki Saito 2k Jan 09, 2023
Python Image Morpher (PIM) is a program that can take two images and blend them to whatever extent or precision that you like

Python Image Morpher (PIM) is a program that can take two images and blend them to whatever extent or precision that you like! It is designed to emulate some of Python's OpenCV image processing from

David Dowd 108 Dec 19, 2022
Imutils - A series of convenience functions to make basic image processing operations such as translation, rotation, resizing, skeletonization, and displaying Matplotlib images easier with OpenCV and Python.

imutils A series of convenience functions to make basic image processing functions such as translation, rotation, resizing, skeletonization, and displ

PyImageSearch 4.3k Jan 01, 2023
Steganography Image/Data Injector.

Byte Steganography Image/Data Injector. For artists or people to inject their own print/data into their images. TODO Add more file formats to support.

Ori 4 Nov 16, 2022
Create QR Code for link using Python

Quick Response QR is short and named for a quick read from a cell phone. Used to view information from transitory media and put it on your cell phone.

Coding Taggers 1 Jan 09, 2022
Ascify-Art - An easy to use, GUI based and user-friendly colored ASCII art generator from images!

Ascify-Art This is a python based colored ASCII art generator for free! How to Install? You can download and use the python version if you want, modul

Akash Bora 14 Dec 31, 2022
Archive of the image generator stuff from my API

alex_api_archive Archive of the image generator stuff from my API FAQ Q: Why? A: Because I am removing these components from the API Q: How do I run i

AlexFlipnote 26 Nov 17, 2022
Samila is a generative art generator written in Python

Samila is a generative art generator written in Python, Samila let's you create arts based on many thousand points. The position of every single point is calculated by a formula, which has random par

Sepand Haghighi 947 Dec 30, 2022
Blender addon - convert empty image reference to image plane

Reference to image plane Convert reference images to a textured image mesh plane. As if it was imported with import image as plane Use on drag'n'dropp

Samuel Bernou 6 Nov 25, 2022
⚡ZenGL is a minimalist Python module providing exactly one way to render scenes with OpenGL.

ZenGL is a minimalist Python module providing exactly one way to render scenes with OpenGL.

Szabolcs Dombi 133 Dec 17, 2022
Pnuemonia Normal detection by using XRay images.

Pnuemonia Normal detection by using XRay images. Got image datas from kaggle(link is given in sources.txt file) also normal xray images from other site (also link is given) in order to avoid data dis

Zarina 1 Feb 28, 2022
Extract the ISO 11146 beam size from an image file

laserbeamsize Simple and fast calculation of beam sizes from a single monochrome image based on the ISO 11146 method of variances. Some effort has bee

Scott Prahl 21 Jan 06, 2023
Create a QR-code Generator app using only Python.

QR-code_Generator Create a QR-code Generator app using only Python. This apps generated a QR code for a single link. Libraryes used in this app -- py

Soham P Phasalkar 1 Oct 17, 2021
Python Digital Art Generator

Python Digital Art Generator The main goal of this repository is to generate all possible layers permutations given by the user in order to get unique

David Cuentas Mar 3 Mar 12, 2022
Collection of SVG diagrams about how UTF-8 works

Diagrams Repository of diagrams made for articles on my blog. All diagrams are created using diagrams.net. UTF-8 Licenses Copyright 2022 Seth Michael

Seth Michael Larson 24 Aug 13, 2022
Converting Images Into Minecraft Houses

Converting Images Into Minecraft Houses In this particular project, we turned a 2D Image into Minecraft pixel art and then scaled it in 3D such that i

Mathias Oliver Valdbjørn Jørgensen 1 Feb 02, 2022
Convert the SVG code to PNG and replace the line by a call to the image in markdown

Convert the SVG code to PNG and replace the line by a call to the image in markdown

6 Sep 06, 2022
GIMP script to export bitmap as GRAPHICS 4 file (aka SCREEN 5)

gimpfu-msx-gr4.py GIMP script to export bitmap as GRAPHICS 4 file (aka SCREEN 5). GRAPHICS 4 specs are: 256x212 (or 256x192); 16 color palette (from 5

Pedro de Medeiros 4 Oct 17, 2022