Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,51 @@ Welcome to mapflow's documentation!

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

Installation
------------

You can install ``mapflow`` using ``pip`` or ``conda``.

With pip
~~~~~~~~

.. code-block:: bash

pip install mapflow

With conda
~~~~~~~~~~

.. code-block:: bash

conda install -c conda-forge -y mapflow

Dependencies
~~~~~~~~~~~~

``mapflow`` relies on ``matplotlib`` and ``ffmpeg``. If you're not installing ``mapflow`` from conda-forge, make sure ``ffmpeg`` is installed on your system.

Usage
-----

The main function of ``mapflow`` is ``animate``, which creates a video from an ``xarray.DataArray``.

.. code-block:: python

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')

.. video:: ../_static/animation.mp4
:width: 640
:height: 480

.. toctree::
:maxdepth: 1
:caption: Contents:
:hidden:

installation
how_to_use
api
27 changes: 0 additions & 27 deletions docs/installation.rst

This file was deleted.

Loading