Skip to main content

A Python library to export xarray.DataArray as video files

Project description

mapflow logo

mapflow

PyPI version Conda version CI Documentation Status

mapflow transforms 3D xr.DataArray in video files in one code line.

Documentation

The full documentation is available at mapflow.readthedocs.io.

Installation

pip install mapflow

Or:

conda install -c conda-forge -y mapflow

Features

  • Automatic Coordinate Detection: Identifies x, y, and time coordinates in xarray DataArrays, with fallback options for manual input if needed.
  • CRS Handling: Detects the Coordinate Reference System (CRS) of the data or accepts user-defined CRS when unavailable.
  • Robust Colorbar: Generates a colorbar that handles outliers effectively while allowing customization.
  • Built-in World Borders: Includes default world border data but supports user-provided GeoSeries or GeoDataFrames.
  • Simplified Visualization: The plot_da function provides a one-line alternative to cartopy for quick plotting.

Animate

import xarray as xr
from mapflow import animate

ds = xr.tutorial.open_dataset("era5-2mt-2019-03-uk.grib")
animate(da=ds['t2m'].isel(time=slice(120)), path='animation.mp4')

https://github.com/user-attachments/assets/3cf05957-dd9c-49b1-9452-2e18e950ddcd

Static plot

import xarray as xr
from mapflow import plot_da

ds = xr.tutorial.open_dataset("era5-2mt-2019-03-uk.grib")
plot_da(da=ds['t2m'].isel(time=0))
plot_da

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

mapflow-0.2.12.tar.gz (4.9 MB view details)

Uploaded Source

Built Distribution

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

mapflow-0.2.12-py3-none-any.whl (2.1 MB view details)

Uploaded Python 3

File details

Details for the file mapflow-0.2.12.tar.gz.

File metadata

  • Download URL: mapflow-0.2.12.tar.gz
  • Upload date:
  • Size: 4.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for mapflow-0.2.12.tar.gz
Algorithm Hash digest
SHA256 90dc52cc6310b5a94a5d45ac356d6be27722a707f76f834e84e48356bee8a37c
MD5 94a466795c70ed6054e43fd46b7bf196
BLAKE2b-256 f191e978802b4ed0d5d5ba7242732f58d921ec7b82438db55593fad8c752f1d4

See more details on using hashes here.

File details

Details for the file mapflow-0.2.12-py3-none-any.whl.

File metadata

  • Download URL: mapflow-0.2.12-py3-none-any.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for mapflow-0.2.12-py3-none-any.whl
Algorithm Hash digest
SHA256 f00d74246677e7f13e7cae23b27b98aeb21276bd16b66c9f1cded086b5ee4a5c
MD5 ce0b28e8998f60e2f0a15f40dfb07804
BLAKE2b-256 1b4b264da449fd2c2f01f23e39deabf78feef9e26abda9378258bc82cac5df90

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