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.11.tar.gz (5.3 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.11-py3-none-any.whl (2.1 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mapflow-0.2.11.tar.gz
Algorithm Hash digest
SHA256 180d1b75dc632e0bf21aefca1028ff73b7e017aacfef79b269e065973e8ace41
MD5 374948496ac546f3ee4e801ca3042609
BLAKE2b-256 13b7a63edeafe718e70b53693a1047ef2640708cf2daa8e9b589a194a90fd8bd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mapflow-0.2.11-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.13.7

File hashes

Hashes for mapflow-0.2.11-py3-none-any.whl
Algorithm Hash digest
SHA256 a7b3a2fec33942ad8a7ba8e3683e5d0a3dca01a4b0c85d31e534a91ae8edf154
MD5 4a614eb8a902799e85c0144a08aae032
BLAKE2b-256 358760a14b6a6ee0b668372c8ce799624ebfb2cef90a41262f119a93fa84d269

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