Skip to content
CyrilJlPublic

About

xarray dataarrays to videos

Topics

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

mapflow logo

mapflow

PyPI version Conda version CI Documentation Status License

mapflow creates geographic plots and video animations directly from xarray.DataArray objects. It detects common coordinate names, understands CRS metadata, includes world borders, and streams lazily backed animation frames to keep memory use bounded.

Installation

Install the Python package from PyPI:

python -m pip install mapflow

Or from conda-forge, which also installs FFmpeg:

conda install -c conda-forge mapflow

Creating animations requires the ffmpeg executable on PATH. Static plots do not require FFmpeg.

Quick start

Animation

import xarray as xr

from mapflow import animate

ds = xr.tutorial.open_dataset("era5-2mt-2019-03-uk.grib")
temperature = ds["t2m"]

animate(temperature.isel(time=slice(120)), "temperature.mp4", video_width=1280)
animation.mp4

Static plot

import xarray as xr

from mapflow import plot_da

ds = xr.tutorial.open_dataset("era5-2mt-2019-03-uk.grib")
temperature = ds["t2m"]

plot_da(temperature.isel(time=0))

Example mapflow plot

The documentation covers static plots, scalar animations, vector-field quiver plots, CRS handling, color normalization, and the reusable PlotModel and Animation classes.

About

xarray dataarrays to videos

Topics

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages