Giter Site home page Giter Site logo

msoechting / lexcube Goto Github PK

View Code? Open in Web Editor NEW
110.0 110.0 7.0 5.7 MB

Lexcube: 3D Data Cube Visualization in Jupyter Notebooks

Home Page: https://www.lexcube.org

License: GNU General Public License v3.0

JavaScript 1.37% CSS 0.83% Python 15.94% Dockerfile 0.11% TypeScript 78.32% HTML 3.45%
dask datacube earth-engine eo geographical-information-system geospatial gis google-earth-engine javascript jupyterlab-extension python raster remote-sensing typescript visualization xarray

lexcube's People

Contributors

msoechting avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lexcube's Issues

Render nothing in jupyter notebook[BUG]

Hi Maximilian,

Thank you for your excellent work. I have installed lexcube but encountered an issue - the images are not rendering (no error reported), and I'm not sure what's causing it.

image

image

[BUG] Google Colab not rendering

I was drawn to this library and was trying to render datacube as well.

I was able to run the codes as shown in example but wasn't able to see anything in google colab. I hereby attached the image.

image

lexcube seems to work in Python >= 3.10 only

Describe the bug
Hi @msoechting ,

I was just trying lexcube (it looks awesome!) and ran into an error when using it from Python 3.9. In Python 3.10 it works nicely.

To Reproduce
Steps to reproduce the behavior:
Install lexcube in a Python 3.9 environment and run this code:

import lexcube

This error pops up:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[1], line 1
----> 1 import lexcube
      2 import xarray as xr
      3 import numpy as np

File ~\mambaforge\envs\bio39\lib\site-packages\lexcube\__init__.py:20
      1 #!/usr/bin/env python
      2 # coding: utf-8
      3 
   (...)
     17 # You should have received a copy of the GNU General Public License
     18 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
---> 20 from .cube3d import Cube3DWidget, Sliders
     21 from ._version import __version__
     23 def _jupyter_labextension_paths():

File ~\mambaforge\envs\bio39\lib\site-packages\lexcube\cube3d.py:46
     41     def cancel(self):
     42         self._task.cancel()
     45 @widgets.register
---> 46 class Cube3DWidget(widgets.DOMWidget):
     47     _model_name = Unicode('Cube3DModel').tag(sync=True)
     48     _model_module = Unicode(module_name).tag(sync=True)

File ~\mambaforge\envs\bio39\lib\site-packages\lexcube\cube3d.py:70, in Cube3DWidget()
     66 zwrap = Bool(False).tag(sync=True)
     68 isometric_mode = Bool(False).tag(sync=True)
---> 70 def __init__(self, data_source, cmap: str | list | None = None, vmin: float | None = None, vmax: float | None = None, isometric_mode: bool = False, use_lexcube_chunk_caching: bool = True, **kwargs):
     71     super().__init__(**kwargs)
     72     self.cmap = cmap

TypeError: unsupported operand type(s) for |: 'type' and 'type'

Expected behavior
A clear and concise description of what you expected to happen.

Either this bug could be fixed, or the installation instructions should mention support for Python >= 3.10 only. Also this line should be removed:

"Programming Language :: Python :: 3.9",

And this one modified:

requires-python = ">=3.9"

I'm happy to send a pull-request with either one of the solutions if you like.

Best,
Robert

Addition of geographic information

** Feature request**
Hi Maximilian,

Lexcube is very interesting. I played with the web interface a little bit (https://www.lexcube.org/?!esdc-3.0.2/air_temperature_2m/0-1976/0-718/596-1312) and also with a sample ocean model output of temperature (a 4D dataset) in a jupyter lab framework. Working with geophysical fields mostly (coupled atmosphere and ocean model) it would be useful to be able to add coastlines and coordinates gridlines.

** Solution **
Something similar to cartopy coastlines feature and gridlines.
(ex. latitude and latitude gridlines at specific intervals, i.e like regular 10 degrees.
Same thing for vertical z coordinates, ex depth at 10m intervals, ...)

Just an example ...
Snapshot_windspeed_matplotlib_with_coastlines_and_grid

https://scitools.org.uk/cartopy/docs/v0.13/index.html

Jean-Marc

Ability to click through individual timeframes, e.g. with keyboard

Describe the solution you'd like

I use the viz a lot for debugging my data. It would often be nice to be able to tap through each timestep manually. Dragging with the mouse is imprecise and much slower.

This could either be a button or some key on the keyboard.

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.