Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 12:51
    jlstevens commented #4794
  • 12:49
    jlstevens commented #4794
  • 11:37
    philippjfr synchronize #4794
  • 11:37

    philippjfr on highlight_operation

    Use df._meta for empty df (compare)

  • 11:35
    philippjfr synchronize #4794
  • 11:35

    philippjfr on highlight_operation

    Fix reduce on empty element Null test over mask area (compare)

  • 10:44
    philippjfr milestoned #1933
  • 10:44
    philippjfr labeled #1933
  • 10:44
    philippjfr unlabeled #1933
  • 10:44
    philippjfr labeled #1933
  • 10:44
    philippjfr opened #1933
  • Jan 21 22:28
    jlstevens synchronize #4794
  • Jan 21 22:28

    jlstevens on highlight_operation

    Unchained transformers (compare)

  • Jan 21 21:23
    philippjfr synchronize #4794
  • Jan 21 21:23

    philippjfr on highlight_operation

    Correctly look up vdims (compare)

  • Jan 21 20:10
    jlstevens commented #4794
  • Jan 21 18:25
    philippjfr synchronize #4794
  • Jan 21 18:25

    philippjfr on highlight_operation

    Fix flake (compare)

  • Jan 21 18:19
    philippjfr synchronize #4794
  • Jan 21 18:19

    philippjfr on highlight_operation

    Remove vdims reference (compare)

James A. Bednar
@jbednar
If you are expecting this from the particles:
image.png
A physical robot will actually draw this:
image.png
Because the robot will have to physically move between each successive location.
So don't expect results like in the first plot, only the second!
RaphyStark
@RaphyStark
Okay... So that's really difficult haha..
Okay thank you all again for your attentiveness !
Rich Signell
@rsignell-usgs
Best to stick with Python 3.7 when using holoviz? holoviz/holoviews#4667
James A. Bednar
@jbednar
Your call; the warnings are new, but the code involved hasn't changed, and behaves the same under 3.7 and 3.8, so while we do need to make sure the warnings don't appear, it's no worse under 3.8 than 3.7 otherwise.
Jon Mease
@jonmmease
@/all I add the Dash HoloViews PR (holoviz/holoviews#4605) to the HoloViews 1.14.0 milestone. Could folks go through and populate this milestone with what they're planning to be included in 1.14.0? My request would be to aim to get master into release candidate shape in ~2 weeks and then to get a release out early in the week of the 23rd (before the U.S. Thanksgiving holiday). Let me know how I can help out with review / testing of other PRs.
James A. Bednar
@jbednar
Sounds good to me!
Marc Skov Madsen
@MarcSkovMadsen
Marc Skov Madsen
@MarcSkovMadsen
image.png
Totally agree with the above https://discourse.holoviz.org/t/pipelines-user-guide-broken/1385. The examples on HoloViz.org should be working. Its a matter of trust.
Jon Mease
@jonmmease
I'm looking at adding Plotly support for the hv.Tiles element, and one thing I'm running into is that the mapbox library that plotly uses expects coordinates in lat/lon (even though they are displayed in Web Mercator). In the past I've done this with pyproj. How would you all feel about the Plotly backend using pyproj as an optional dependency for the Tiles element? @philippjfr
I know it's overlap with GeoViews functionality, but it's pretty much 2 lines of pyproj for each conversion direction so it doesn't seem like a big issue to me personally.
James A. Bednar
@jbednar
pyproj is great for supporting arbitrary projections, but if it's just web mercator <-> lat,lon, then it's easy enough to write a Numpy function for that. E.g. datashader has utils.lnglat_to_meters (5 lines or so, and no Numba dependency).
I don't have the corresponding code for the opposite direction, but I assume it would be similar.
Jon Mease
@jonmmease
Yeah, adding a small implementation is fine with me too.
James A. Bednar
@jbednar
I think someone else requested it recently (Jean-Luc?), so having it in HoloViews isn't crazy, as bringing in all the dependencies of GeoViews is often a non-starter.
Jean-Luc Stevens
@jlstevens
this did come up recently
iirc the transform is in datashader without any big dependency...I would investigate how hard it is to get lat/lon <-> web mercator and nothing else without any geo dependency (but maybe numba as datashader depends on it anyway)
essentially that seems like the minimal utility in HoloViews that would exist to handle web mercator
James A. Bednar
@jbednar
Right; my current version depends only on Numpy. I forget how I wrote that (years ago!); I think I just followed what Wikipedia said the conversion function was.
Jean-Luc Stevens
@jlstevens
as holoviews doesn't handle any fancy projections it should be possible to avoid other fancier geo dependencies
James A. Bednar
@jbednar
Right. I'm happy for such a function to go into Datashader, but really it's valuable even without Datashader, and HoloViews seems like the least common denominator here. Really it doesn't belong there either, but there's nowhere better it does belong, so...
I guess it could go directly into holoviews/element/tiles.py ; it would make sense there.
Jean-Luc Stevens
@jlstevens
happy for it to be there...or even a special classmethod on hv.Tiles (assuming heavy dependencies can be avoided)
the only thing I would be against is expanding beyond web mercator and lat/lon...more sophisticated transforms are for geoviews to handle, not holoviews
James A. Bednar
@jbednar
Agreed!
Jon Mease
@jonmmease
Ok, thanks for the feedback!
Jon Mease
@jonmmease
So in Plotly, there is a scattermapbox trace (for geo scatter plots) that's separate from the scatter trace. Are these the same thing for Bokeh? I'm wondering if I'll need to do something special in the overlay plot logic to check whether to convert the Scatter element into a plotly scatter or scattermapbox trace.
James A. Bednar
@jbednar
What's the difference -- geo projecting or not? If so that's the difference between hv.Points and gv.Points (or hv.Scatter and gv.Scatter, depending on whether y is dependent or independent). hv.Points can be overlaid onto hv.Tiles only if the hv.Points data is already projected into Web Mercator, while gv.Points can be overlaid on hv.Tiles or anything else, automatically reprojecting if needed. Sounds like since I think you said mapbox handles the projections internally, then hv.Points can be overlaid onto it even without reprojecting. so there's a bit of a mismatch here. Not sure how to handle that.
Jon Mease
@jonmmease
The difference is that regular plotly scatter traces can't display on top of a map. The scatter mapbox trace can be displayed on maps, and it only accepts coordinates as lat/lon. I was planning that the plotly backend would interpret the hv.Scatter dimension values as web-mercator and would perform the conversion to lat/lon internall during display.
The slightly tricky part is that the Plotly data structures generated for hv.Scatter will be of a different type when the hv.Scatter is overlayed with an hv.Tiles element.
James A. Bednar
@jbednar
Sounds like the only feasible approach.
Jacob Barhak
@Jacob-Barhak
Does anyone know why this custom hover tool does not work with images:
image.png
Here is the code:
import numpy as np
import holoviews as hv
from holoviews import opts
hv.extension('bokeh')
from bokeh.models import HoverTool
from bokeh.models import CustomJSHover
ls = np.linspace(0, 10, 200)
xx, yy = np.meshgrid(ls, ls)
MyCustomZ = CustomJSHover(code='''return "test";''')
MyHover1 = HoverTool(
    tooltips=[
        ( 'newx', '@x'),
        ( 'newy', '@y'),
        ( 'newz', '@z{custom}'),
   ],
    formatters={
        'x' : 'numeral',
        'y' : 'numeral',
        '@z' : MyCustomZ,
    },
    point_policy="follow_mouse"
)
img = hv.Image(np.sin(xx)*np.cos(yy)).opts(tools=[MyHover1])
img
Jacob Barhak
@Jacob-Barhak
I was trying to answer this question on discourse and got stuck with not being able to show simple text on an image while I can do more complicated things here . so either the image plot has some other parameters that need to be explained or there is a bug. Since this may be bokeh related, perhaps Bryan needs to see this, otherwise @jbednar - please redirect to whoever can help. If this is a bug, I will happily file an issue.
James A. Bednar
@jbednar
@jlstevens can probably answer that...
Jean-Luc Stevens
@jlstevens
holoviews just passes through whatever custom bokeh hover tool you have
geoviews has some stuff that can go wrong in this regard, but not holoviews afaik
Andrew
@IAteAnDrew1_twitter
I think @z needs to be @image
holoviz/holoviews#4236
Jacob Barhak
@Jacob-Barhak
Thanks @IAteAnDrew1_twitter - you are correct. changing z to image fixes the code - it works now.
Jean-Luc Stevens
@jlstevens
great!
Andrei Berceanu
@berceanu
I have a question about Datashader, is this the right channel?
Andrei Berceanu
@berceanu
So, after I do
cvs = ds.Canvas(plot_width=700, plot_height=700)
agg = cvs.points(df, 'x_mu', 'y_mu')