Coder Social home page Coder Social logo

carlos-gg / ecubevis Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 1.0 30.13 MB

Earth CUBE VISualization with Python. Intended for the interactive exploration of n-dimensional (2D, 3D, 4D or 5D) arrays on Jupyterlab

License: Apache License 2.0

Python 0.17% Jupyter Notebook 99.83%
python visualization jupyterlab interactive earth-data

ecubevis's Introduction

Python - Version Open In Colab

Welcome to the repository of ecubevis

ecubevis: Earth CUBE VISualization with Python. Intended for the interactive exploration of n-dimensional (2D, 3D, 4D or 5D spatio-temporal) arrays on Jupyterlab. Supports both xarray.Dataset/DataArray (with metadata) or numpy.ndarray objects.

How to install

Install ecubevis from pypi:

pip install ecubevis

If installing cartopy with pip is not working, use conda:

conda install cartopy

If cartopy kills your Jupyter notebook kernel try this:

pip install shapely --upgrade --force-reinstall --no-binary shapely

How to use

Import the library:

import ecubevis as ecv

The main function in ecubevis is ecv.plot(). In interactive mode, the plot comes with sliders (thanks to hvplot/holoviews) allowing easy exploration of multi-dimensional data as 2D arrays across the time and additional dimensions. Under the hood, ecv.plot() calls one of the following functions depending on the data type:

  • ecv.plot_ndarray(): For plotting an in-memory numpy.ndarray object with 2, 3, 4 or 5 dimensions (ndarrays do not carry metadata so the dimensions are given with the dimensions argument). The function can take a tuple of 2D ndarrays, even with different grid/image size.

  • ecv.plot_dataset(): For plotting an in-memory xr.Dataset or xr.DataArray objects with 2, 3, or 4 dimensions. The dimensions expected are [lat, lon] for 2D arrays, [time, lat, lon] for 3D arrays or [time, level, lat, lon] for 4D arrays.

Examples

ecubevis will allow you to create:

Interactive Static
plots of in-memory 2D, 3D and 4D xr.Dataset or xr.DataArray objects: mosaics of in-memory 3D and 4D xr.Dataset or xr.DataArray objects:
plots of in-memory 2D, 3D and 4D numpy.ndarray objects (composition thanks to holoviews): plots of in-memory 2D, 3D and 4D numpy.ndarray objects:
plots of in-memory xr.Dataset or xr.DataArray while sub-setting across dimensions: plots of a tuple of in-memory 2D numpy.ndarray objects:

ecubevis's People

Contributors

carlos-gg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

abrilsoldier

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.