Closed pgierz closed 3 years ago
Note that setting these two lines to empty strings seems to solve that problem: https://github.com/intake/xrviz/blob/b5969232b14aad408cbceceea41469dae6cf3235/xrviz/style.py#L93-L96
However, I am not sure if that causes other problems. I'm happy to send a PR for that if the developers agree.
You can set CRS as detailed on this page, but there is no automatic way to extract or guess this.
Your proposed solution seems like a reasonable thing to do - text boxes should have string values, not None
. However, it's been a while since I've looked at this code.
@hdsingh , do you agree with this change? More generally, are you likely to have the time to respond to any issues that crop up here?
Yes, it looks reasonable. Although we are converting the input into string later on here, not sure what's exactly causing this issue. @pgierz Can you please also verify if this works fine for the sample dataset as well.
@martindurant Please feel free to tag me in the issues, I will try my best to respond when I have some bandwidth.
Thanks, @hdsingh
My eventual goal is to build an intake driver, and I'm learning more about how that works.
@pgierz , don't hesitate to ask on the intake tracker.
Hi @hdsingh, sure. I did a clean install just to be safe. I basically did the Conda-variant of the TravisCI config:
$ mkdir -p ~/Code/intake
$ cd ~/Code/intake
$ git clone https://github.com/intake/xrviz.git
$ cd xrviz
$ conda create -c conda-forge -n xrviz-dev python=3.7 pytest --file requirements.txt
$ conda activate xrviz-dev
$ pip install . --no-deps
$ pytest
That resulted in all tests passing:
============================= test session starts ==============================
platform darwin -- Python 3.7.10, pytest-6.2.3, py-1.10.0, pluggy-0.13.1
rootdir: /Users/pgierz/Documents/Code/github.com/intake/xrviz
collected 50 items / 1 skipped / 49 selected
xrviz/tests/test_control.py . [ 2%]
xrviz/tests/test_coord_setter.py . [ 4%]
xrviz/tests/test_dashboard.py ...........ss........s [ 48%]
xrviz/tests/test_describe.py . [ 50%]
xrviz/tests/test_display.py ... [ 56%]
xrviz/tests/test_example.py . [ 58%]
xrviz/tests/test_fields.py ...... [ 70%]
xrviz/tests/test_style.py .......... [ 90%]
xrviz/tests/test_utils.py ..... [100%]
=============================== warnings summary ===============================
../../../../../anaconda3/envs/xrviz-dev/lib/python3.7/site-packages/fsspec/__init__.py:47
/Users/pgierz/anaconda3/envs/xrviz-dev/lib/python3.7/site-packages/fsspec/__init__.py:47: DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.
for spec in entry_points.get("fsspec.specs", []):
xrviz/tests/test_dashboard.py::test_2d_variable_for_dims
/Users/pgierz/anaconda3/envs/xrviz-dev/lib/python3.7/site-packages/holoviews/operation/datashader.py:5: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
from collections import Callable
xrviz/tests/test_dashboard.py::test_create_taps_and_series_graph_for_2d_coords
/Users/pgierz/anaconda3/envs/xrviz-dev/lib/python3.7/site-packages/xarray/core/dataarray.py:4226: DeprecationWarning: Behaviour of argmin/argmax with neither dim nor axis argument will change to return a dict of indices of each dimension. To get a single, flat index, please use np.argmin(da.data) or np.argmax(da.data) instead of da.argmin() or da.argmax().
result = self.variable.argmin(dim, axis, keep_attrs, skipna)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
================== 47 passed, 4 skipped, 3 warnings in 35.41s ==================
Running xrviz show xrviz/sample_data/great_lakes.nc
technically works, yet has the same grayed-out plot button as in the example using my own data. My proposed change fixes the example as well as my own data, see #75
@martindurant, I may come back to you with some questions, thank you. For now, I need to puzzle around a bit first and learn the library
Hello,
I'm trying to use xrviz with a multi-file Xarray dataset containing netcdf data. Originally, the data looks like this:
I have various data variables, defined in Lon/lat/time (and sometimes vertical level). The output unfortunately has rather bad time-stamping. For example, the date
3700-01-31
is stored as a float37000131.75
so I have a small function to clean that up. Note that these are hypothetical dates, and could just as easily just count months upward from an arbitrary year 1:My eventual goal is to build an intake driver, and I'm learning more about how that works. The first step would be to have the dates automatically cleaned up. I haven't hooked up the intake driver yet and am still running the preprocess method by hand (if there are any hints how to do that, I'd be very grateful!)
So, I have something like:
I noticed that the read_chunked takes a while, even though it should just be loaded in the metadata rather than the actual arrays. If there are any ideas how to speed that up, I'd be interested.
The xrviz dashboard loads up and shows me a list of variables, which seems correct.
However, the plot button is greyed out, and I can find the following error in the console:
Also, the online documentation seems to have options for setting up the projection. I can't find those.
Any hints would be great! Thanks! Paul