Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 17:05
    MarcSkovMadsen commented #1787
  • 16:59
    jlstevens milestoned #1781
  • 16:59
    jlstevens labeled #1781
  • 16:56
    jlstevens commented #1786
  • 16:50
    jlstevens commented #1787
  • 16:49
    jlstevens milestoned #1787
  • 16:49
    jlstevens unlabeled #1787
  • 16:48
    jlstevens labeled #1787
  • 16:45
    jlstevens milestoned #1790
  • 16:45
    jlstevens commented #1790
  • 16:44
    jlstevens unlabeled #1790
  • 16:44
    jlstevens labeled #1790
  • 16:42
    jlstevens unlabeled #1794
  • 16:42
    jlstevens milestoned #1794
  • 16:42
    jlstevens labeled #1794
  • 16:41
    jlstevens commented #1797
  • 16:38
    jlstevens labeled #1797
  • 16:35
    jlstevens edited #1797
  • 16:34
    jlstevens milestoned #1798
  • 16:33
    jlstevens labeled #1798
James A. Bednar
@jbednar

Here it's telling me I'm using libraries from the pyviz environment, except that Datashader is being used from my dirty (locally modified) git checkout. conda list won't reveal the location in a case like this, but should work if you only ever use conda.

What's reported here is what would be found if you started python from the command line and imported things from there. If you're in Jupyter or another environment that lets you select kernels, you can be really, really sure if you run the report from within Python:

>>> import pyct
>>> pyct.report("system","datashader")
system=Darwin-19.6.0           # OS: Darwin-19.6.0-x86_64-i386-64bit
datashader=0.11.2a4+gf73a7c9-dirty # /Users/jbednar/datashader/datashader
James A. Bednar
@jbednar
Pyct is a dependency of some (most?) of our tools, but it has only had these features since September, and conda may not update to it aggressively when you install, so these features may not be available. Once we think it's more widely installed, I'll add these instructions to the bug reporting templates so that we'll get the info we need to debug things.
James A. Bednar
@jbednar
I guess this should have been a Discourse question and answer. :-/
Dhruv Balwada
@dhruvbalwada
Newbie question - sometimes when working in a notebook and debugging (read replotting things over and over), things just stop working (like linked figures don't respond to each other) or start doing weird things (axis jiggling around etc). This usually requires me to terminate the notebook and start over again, I am assuming the problem is that I am not closing the figures some unused/reused garbage variables in the background keep building up. Is there a better way to do things when debugging?
This is particularly a problem because sometimes if it not obvious if things stopped working because of the above reason, or because I have an actual bug in the code.
James A. Bednar
@jbednar
Not sure what tools you're using here.
HoloViews? hvPlot? Datashader?
Panel?
Dhruv Balwada
@dhruvbalwada
Oops, yes. I am combining holoviews and Panel.
James A. Bednar
@jbednar
Does it happen with hv alone, or only with hv+pn?
In any case the only experience I've had like that is when I define variables in a Jupyter notebook and then redefine them later, inadvertently sharing bits of my figures between different cells.
Dhruv Balwada
@dhruvbalwada
Most recently I have noticed it when I combine things, and I use reactive functions (@pn.depends).
Yes, I think that might be the problem - as sometimes I will have some variable names like 'temp' that get redefined again and again.
James A. Bednar
@jbednar
Or when I take the same figure and display it in different cells; sometimes the underlying streams should be shared, sometimes they should not, and it ends up violating my expectations. The answer in that case is generally to make a fresh copy of whatever I'm using, if I want it to be independent of something in a previous cell.
Dhruv Balwada
@dhruvbalwada
Thanks, I will try to stay away from doing these and see if I encounter it again. :)
James A. Bednar
@jbednar
The times I've particularly noticed strange behavior is for multi-step pipelines for Datashader plots, where the same final figure is used in multiple cells. In such cases zooming in one of them affects the other, due to shared streams of zoom values. Definitely with Datashader pipelines it's important to create the pipeline again in each cell where you want it to run, so that they are independent. I can't think of examples where I've seen this without Datashader, but it could definitely happen with linked_selections or other deep-pipeline approaches.
"Restart and Run All" is definitely your friend. :-)
Dhruv Balwada
@dhruvbalwada
:+1:
Dhruv Balwada
@dhruvbalwada
Regarding panel and holoviews - How would one go about ensuring that the zoom level on a plot is not reset when some property in the plot is changed. For example the Holoviz tutorial has an example in notebook 08_Advanced_Dashboards where the user can select the colormap for a population map. However, if one is zoomed in a region and changes the colormap the plot resets to global scale. Is there a way/flat to suppress this? (Should I ask this in discourse instead?)
James A. Bednar
@jbednar
Yes, ask on discourse instead. I don't remember what code we were using in 08, but e.g. https://examples.pyviz.org/datashader_dashboard/dashboard.html shouldn't behave like that, because the cmap gets updated in place.
It's easy to write code that simply redraws everything, but as you point out you do lose interactive state when you do that, so it's better if you can take the time to avoid that.
Dhruv Balwada
@dhruvbalwada
Thanks, I will look at this example, and post on discourse.
Dhruv Balwada
@dhruvbalwada
This example uses the Parameterized class API of Panel. Is it fair to assume that I will have to use that to get the required behavior, and it can not be achieved using Reactive functions (the approach I am currently using)?
James A. Bednar
@jbednar
No; there's no particular difference in functionality between those two approaches. I've translated that notebook to use reactive functions; see https://anaconda.org/jbednar/dashboard_barewidgets/notebook (haven't ever published it anywhere else, I'm afraid!). That version uses the pn.depends decorator, but I was planning to update it for pn.bind (just introduced in Panel 0.10.1) if that's the one you're using (a trivial translation, but clearer I think).
Dhruv Balwada
@dhruvbalwada
Thanks, will check this one out. I an using pn.depends .
Jon Mease
@jonmmease
plotly_holoviews_map_datashader_link_selections.gif
:arrow_up: PR for Plotly map Tiles support in HoloViews with datashade and link_selections support (holoviz/holoviews#4686).
Marc Skov Madsen
@MarcSkovMadsen
Nice
Rich Signell
@rsignell-usgs
We should be able to do the Folium stuff in cell [2] in geoviews, right?
James A. Bednar
@jbednar
Sure.
That all looks well within the capabilities of GeoViews.
James A. Bednar
@jbednar
Oh, those are WMS tiles? I think you'd actually have to download them locally and use them as data. There was a project to add WMS tile support to Bokeh a long time ago, but I think that stalled out.
Rich Signell
@rsignell-usgs
Philipp Rudiger
@philippjfr
That's not accurate, it's supported but requires a bit of knowledge about the internals:
url1 = "https://elevation.nationalmap.gov/arcgis/services/3DEPElevation/ImageServer/WMSServer?&service=WMS&request=GetMap&layers=3DEPElevation%3AHillshade%20Gray&styles=&format=image%2Fpng&transparent=false&version=1.3.0&width=256&height=256&crs=EPSG%3A3857&bbox={XMIN},{YMIN},{XMAX},{YMAX}"
url2 = 'https://datacube.services.geo.ca/ows/elevation?service=WMS&request=GetMap&layers=hrdsm-hillshade&styles=&format=image%2Fpng&transparent=false&version=1.3.0&width=256&height=256&crs=EPSG%3A3857&bbox={XMIN},{YMIN},{XMAX},{YMAX}'

hv.element.tiles.Wikipedia() * hv.Tiles(url1) * hv.Tiles(url2, extents=(-15673871.272045106,9568692.948851505,-15654303.3928041,9588260.828092515))
You may also have to set 'min_zoom', 'max_zoom' in the opts appropriately.
James A. Bednar
@jbednar
Is that documented somewhere?
Rich Signell
@rsignell-usgs
Wow, @Philipp, so cool! I didn't want to use Folium!
James A. Bednar
@jbednar
Folium isn't so bad. :-)
Rich Signell
@rsignell-usgs
But it's not in my JH environment. :)
James A. Bednar
@jbednar
Ah!
Philipp Rudiger
@philippjfr

It's sort of documented here: http://geoviews.org/user_guide/Working_with_Bokeh.html

But even if you know about the URL format you still have to figure out how to supply it in the URL. I manually looked at the requests folium was making and then copied the URLs it was generating.

Eric Parnell
@eaparnell
Is it normal for https://hvplot.holoviz.org/ to get a 404?
James A. Bednar
@jbednar
Nope! It was being rebuilt and ran into an error, but @philippjfr fixed it!
neocronomican
@neocronomican_twitter

Hi, I tried to follow this link:

https://geoviews.org/gallery/bokeh/tile_sources.html#bokeh-gallery-tile-sources

But I got this error...

AttributeError: type object 'opts' has no attribute 'WMTS'
neocronomican
@neocronomican_twitter
Which version of geoviews to run that example?
neocronomican
@neocronomican_twitter
I can not overlay (*) any gv.Image or gv.Points with gv.tiles. I used bokeh beckend. What is the problem?
Philipp Rudiger
@philippjfr
This channel is primarily reserved for develop discussions. Please post a question to the discourse (https://discourse.holoviz.org/) with a reproducible example of what you've tried.
James A. Bednar
@jbednar
Be sure to show what output you get, i.e. an error message or a plot that doesn't look right; we can't do much with "cannot overlay" without more details!
neocronomican
@neocronomican_twitter
I am sorry for my mistake. I have not been long time following this channel...