Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 04:04
    maihde commented #875
  • 04:02
    maihde synchronize #875
  • 00:19
    jbednar commented #4119
  • 00:14
    jbednar synchronize #4119
  • 00:14

    jbednar on selection_mode

    Updated and expanded Linked_Sel… (compare)

  • Feb 20 23:56
    philippjfr synchronize #4119
  • Feb 20 23:56

    philippjfr on selection_mode

    Only attach selection stream on… (compare)

  • Feb 20 23:00

    jonmmease on spatialpandas_sindex_init

    Don't trigger creation of the s… (compare)

  • Feb 20 22:43
    philippjfr closed #4235
  • Feb 20 22:43
    philippjfr commented #4235
  • Feb 20 22:26
    brendancol closed #858
  • Feb 20 22:19
    jchutrue opened #4235
  • Feb 20 18:17
    philippjfr labeled #4234
  • Feb 20 18:17
    philippjfr labeled #4234
  • Feb 20 18:17
    philippjfr commented #4234
  • Feb 20 17:42
    jonmmease opened #4234
  • Feb 20 15:07
    jbednar edited #1111
  • Feb 20 14:46
    tchaton closed #1111
  • Feb 20 14:46
    tchaton commented #1111
  • Feb 20 14:13
    tchaton commented #1111
Philipp Rudiger
@philippjfr

hi, if I have a matplotlib figure/ax, can I use holoviews' layout to plot them?

@kitaev-chen No HoloViews generates matplotlib output but does not accept it, if you want to lay out matplotlib plots with other components you can use Panel.

In any case I'd need more background about your use case so I'd recommend posting your question to Discourse.
Bryan Van de Ven
@bryevdv
@philippjfr 2.0.0dev6 is available I have not yet done any testing beyond making sure it is installable (first "by hand" build run-through)
Jacob Barhak
@Jacob-Barhak
@philippjfr , is there a way to reduce the number of combined options by treating each interactive element separately and constructing its bokeh event code separately?If so, there may be some escape from the curse of dimensionality you are experiencing with embed. To better explain. I can now generate multiple html files each of one holoviews object and include those in separate tabs using the html object tag . lets say I say may holomap is of size 5x5 =25 states, if I have 5 tabs each replicating this holomap with slight variations, my state space is already 25^5 ~10M states. However, if I am encapsulating each HoloMap separately as html after being generated and just bring those back , it is reasonable. The thing is that now I have multiple files - I rather have the entire snapshot in one file. Typically, a user is less interested that the entire state space will be preserved between different objects - its more that reasonable to expect that if a user changes one HoloMap object, it will reset another HoloMap object to the starting state - this can be a reduction option in embed in the future. HI was trying to play around with this over the weekend and currently it seems the only workaround to reduce state space is escaping panel with the object tag trick. Hopefully you have other ideas.
Geir Arne Hjelle
@gahjelle
Hi. I have a panel app that is essentially showing a map with a dataset plotted on top. I'm looking for a way to offer my users a download of the data. So far, the app has just been running locally, so then it's been as simple as downloading to a local file. However, now we want to move the app to a server, so I need a different solution.
Does panel already have a solution for pushing a file to the browser so it can be downloaded? Or do you know of a third-party package which makes this convenient?
Andrew
@IAteAnDrew1_twitter
Maybe you can post the question on https://discourse.holoviz.org/
Also what type of file are you trying to download?
but its ongoing holoviz/panel#915
Jacob Barhak
@Jacob-Barhak
Hi @gahjelle - panel can help you make a snapshot of your map as an html file easily - However, it depends on level of interactivity with your map . Please check this discourse I started about saving - it explains some things about saving files: https://discourse.holoviz.org/t/tips-for-saving-interactive-plots-as-html/175/2 . Yet to answer your question properly you have to provide more information on interactivity you have. Yet in a nutshell, if your app is not very interactive, you can export it easily , the more interactivity you have, the harder it is - although possible in many cases.
Geir Arne Hjelle
@gahjelle

Thanks a bunch, @IAteAnDrew1_twitter @Jacob-Barhak
I believe issue holoviz/panel#915 will be the answer to my challenge, so I can wait for that - and possibly even help out with some testing at the current stage. I'll have a look!
I'm looking to download the underlying data, ideally as an Excel-file. Today I use pandas to convert the dataset (or really, the underlying dataframe) to Excel. I assume something similar will be possible with the upcoming FileDownload widget.

Thanks again for the quick answers

Andrew
@IAteAnDrew1_twitter
if you know javascript, you can create a javascript callback on pressing a panel.widgets.Button to download a file
Geir Arne Hjelle
@gahjelle

@IAteAnDrew1_twitter That was my plan Z :yum: I'm hoping to avoid writing the JavaScript myself as it's not really my strong suit, and I don't think our client would want to support the extra JS.

Btw, thanks for pointing out the discourse link. I hadn't realized that you had moved support there. Will use it next time. Thanks again for the awesome support!

Jacob Barhak
@Jacob-Barhak
Ok @gahjelle , you want to download the data, not the image - in that case you can ignore what I wrote, I thought you wanted to snapshot your map and download it to a file.
Geir Arne Hjelle
@gahjelle
@Jacob-Barhak :thumbsup:
Marc Skov Madsen
@MarcSkovMadsen
Hi @gahjelle . You can look at these links for file download https://github.com/holoviz/panel/issues/839#issuecomment-561538340 and holoviz/panel#915
Marc Skov Madsen
@MarcSkovMadsen
The first link is based on base64 encoded urls and can be used now.
Andrew Tolmie
@DancingQuanta
Hi, is there a way to turn on colour cycle for errorbars used in Overlay/MdOverlays?
Andrew Tolmie
@DancingQuanta
Okay, I can do opts.ErrorBars(color=Cycle()). Only that will change the color of the vertical lines but not the caps.
Philipp Rudiger
@philippjfr
@gahjelle I'd very much appreciate some feedback on what the UI for the download component should look like.
Jacob Barhak
@Jacob-Barhak
@philippjfr , good news from my side - panel version 0.8 gives me good results - one problem with titles that I thought was generated by panel last Friday was actually generate by a bug in my own code assigning a wrong title. So it seems that your fixes with HoloMap Embed were good. I can now generate the results for the presentations in March and May. I do still have some issues, yet those are minor and I am pretty sure I can bypass most of them.
Since the code on my side seems to be finished, I have some time I can invest in helping with improving embed. I already started documentation over the weekend and have some ideas I posted here. Let me know if any of this seems reasonable to you and where you want to go with this - if reasonable, I will be happy to contribute some code.
Marc Skov Madsen
@MarcSkovMadsen
FYI. Just some inspiration for Panel and analytics in general. See https://perspective.finos.org/ and their python bindings for jupyter and Tornado here https://github.com/finos/perspective/tree/master/python/perspective
They also have integration to this nice hypergrid https://github.com/fin-hypergrid/core
Marc Skov Madsen
@MarcSkovMadsen
I was just thinking that 1) Was there something to learn about their communication and how they use web assembly + web components? 2) could it be easily integrated into Panel as there is already some sort of Tornado and Jupyter support?
Chris B
@ceball
@philippjfr and I were just discussing perspective yesterday, by chance. I am opening an issue about it (at his request).
And yes, it should already be possible to use it via ipywidgets_bokeh. (I unfortunately can't use bokeh 2/python 3 just yet, so can't try that.)
neocronomican
@neocronomican_twitter
Is there any example to plot seismic reflection data using Geoviews or Holoviews?
sphx_glr_seismic-wiggle_001.png
Wiggle-plot-of-a-seismic-shot-gather.png
Marc Skov Madsen
@MarcSkovMadsen
Is it possible to deploy panel apps via Jupyter Hub? (I know there are attempts for Streamlit https://discuss.streamlit.io/t/jupyterhub-streamlit/1238/5)
I raised the question in Discourse. Please answer there. Thanks. https://discourse.holoviz.org/t/is-it-possible-to-deploy-and-run-panel-apps-via-jupyter-hub/189
Philipp Rudiger
@philippjfr
Marc Skov Madsen
@MarcSkovMadsen
Nice (I think). The documentation is a bit sparse. My guess is that this is something I should install (don't know how) on a jupyter server? And then my code should be in a notebook and not a code file? @philippjfr ?
James A. Bednar
@jbednar
@neocronomican_twitter , no I don't think we have any examples of that. You can probably adapt a Bokeh ridgeplot for this purpose, and we're actively working on making it trivial to add new plots like that (Bokeh "subplots" generalization, by Mateusz Paprocki, in development). In the meantime there are notes at holoviz/holoviews#3654
Julia Signell
@jsignell
@MarcSkovMadsen I just put some more info on the discourse question.
Marc Skov Madsen
@MarcSkovMadsen
Thanks
Dr. Andreas Hopfgartner
@anderl80
Hi all, I'd like to create a rolling forecast plot of a multi-step time series model. So the idea is to have the real time series in the background and at regular time intervals i'd like to plot the forecasted next 10 time steps. Maybe anyone has seen this implemented in pyviz yet?
Dr. Andreas Hopfgartner
@anderl80
btw, when is hv.Segments coming? 😊
xavArtley
@xavArtley
Panel templates are awesome
ezgif.com-video-to-gif (2).gif
Jean-Luc Stevens
@jlstevens
very nice! Any chance that is publicly accessible data for use to use as an example?
xavArtley
@xavArtley
Yes id like to submit it in a pr on panel
Marc Skov Madsen
@MarcSkovMadsen
@jlstevens . You can find the (Bootstrap) Template for awesome-panel.org here https://github.com/MarcSkovMadsen/awesome-panel/tree/master/package/awesome_panel/express/templates/bootstrap_dashboard
Jean-Luc Stevens
@jlstevens
I can't remember the exact status of templates, but I know panel is planning to ship with a number of possible templates. We decided to use a prettier template by default :-)
quaeritis
@quaeritis

Hi, the following happens when i try to render vtk objects:

Feb 06 16:24:05 ibn1-appsrv2 jupyter-lab[25316]: [I 16:24:05.800 LabApp] Kernel restarted: 90c7ada0-f657-4ebd-8360-387c042bb25a
Feb 06 16:24:48 ibn1-appsrv2 jupyter-lab[25316]: ERROR: In ../Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx, line 452
Feb 06 16:24:50 ibn1-appsrv2 jupyter-lab[25316]: vtkXOpenGLRenderWindow (0x55c90c2d9e50): bad X server connection. DISPLAY=[I 16:24:50.301 LabApp] KernelRestarter: restarting kernel (1/5), keep random ports
Feb 06 16:24:50 ibn1-appsrv2 jupyter-lab[25316]: kernel 90c7ada0-f657-4ebd-8360-387c042bb25a restarted
Feb 06 16:25:17 ibn1-appsrv2 jupyter-lab[25316]: [I 16:25:17.450 LabApp] Saving file at /xxxx/VTK.ipynb

I have to set DISPLAY right?

quaeritis
@quaeritis
import os
os.environ["DISPLAY"] = ":99.0"
os.system('Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &')
fix the problem
Philipp Rudiger
@philippjfr
@xavArtley We definitely need to ship a template built on that GoldenLayout, it looks awesome.
James A. Bednar
@jbednar
Yep!
Jacob Barhak
@Jacob-Barhak
@philippjfr , @jbednar , @jlstevens - not sure who can best answer this. I am having an issue with creating an interactive history plot. I first tried with bars and ended up with the following issue that was reported in holoviz/holoviews#4181 . Then I tried with HoloMap with a year slider and a category slider and could not make it work - part of the reason that holoviews does not support switching different y axes between widget switches and I assume the was an issue with the embed save , I do not think this issue is reported, yet I did send it into this chat. So later I decided to reduce complexity and split the plot to multiple plots , each in a different tab with one slider - I figured it should remove the axes switching problem. Yet I still have problems with it. I am sending a file - please slide the slider in the first tab and see no effect, then slide the slider in the second tab and see it working.
I also reduced the code andtook the time to match your c type style. Here is it:
import holoviews as hv
import panel as pn
import bokeh
from bokeh.resources import INLINE
import sys

hv.extension('bokeh')
pn.extension(safe_embed=True) 

print ("Python version is: %s"%sys.version)
for library in [hv,pn,bokeh]:
    print ("%s version %s"% ( library.__name__, library.__version__))

horizontal_limits = (2010,2035)
text_offset_x = 0
text_offset_y = 20

def save_file(file_name, plot_object, tabs_values, title):
    if tabs_values == None:            
        save_object = pn.pane.HoloViews(plot_object)
    else:   
        TabList =  list(zip(tabs_values,plot_object))
        save_object = pn.layout.Tabs(*TabList)
    save_object.save(file_name, resources=INLINE, title = title, embed=True)

data = {}

data['Year'] =                [2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, ]
data['Cohorts'] =             [  22,   34,   40,   47,   47,   91,   91,  123,  123, ]
data['Validations'] =         [ 150,  157,  190,  224,  224,  367,  367,  471,  471, ]

innovations =  {}
innovations[2012] = 'The Reference Model created'
innovations[2013] = 'MIST, HPC, Cloud Computing'
innovations[2014] = 'Evolutionary Computation\nfor Population Generation'
innovations[2015] = 'Object Oriented\n Population Generation'
innovations[2016] = 'Assumption Engine\n Cooperative Ensemble Model'
innovations[2017] = 'ClinicalTrials.Gov Interface'
innovations[2018] = 'Knowledge Gap\nInteractive Visualization'
innovations[2019] = 'Improved Interactive Visualization'
innovations[2020] = 'Include Human Interpretation'

all_dims = data.keys()

vertical_dims = list(set(all_dims) - set(['Year']))
print (vertical_dims)

plot_dicts = [{} for vertical_dim in vertical_dims]
for (year_index,year) in enumerate(data['Year']):
    up_to_year_data = dict( [ (Key, Value[:year_index+1])  for (Key,Value)  in data.items()])
    for (vertical_enum,vertical_dim) in enumerate(vertical_dims):    
        max_y = max(data[vertical_dim])
        point_figure = hv.Points(up_to_year_data, kdims=['Year',vertical_dim])
        spike_figure = hv.Spikes(up_to_year_data, kdims=['Year'], vdims=[vertical_dim])
        text_figure_x = year+text_offset_x
        text_figure_y = min(up_to_year_data[vertical_dim][year_index]+text_offset_y, max_y)
        text_figure = hv.Text(text_figure_x, text_figure_y, innovations[year], halign = 'left').redim(x='Year',y=vertical_dim)
        point_figure_improved = (point_figure).opts (xlim = horizontal_limits, ylim = (0, max_y*2), toolbar=None, default_tools=[], width=500, height=500)
        text_figure_improved = (text_figure).opts (xlim = horizontal_limits, ylim = (0, max_y*2), toolbar=None, default_tools=[], width=500, height=500)
        spike_figure_improved = (spike_figure).opts (xlim = horizontal_limits, ylim = (0, max_y*2), toolbar=None, default_tools=[], width=500, height=500)
        merged_figure = point_figure_improved*spike_figure_improved*text_figure_improved
        save_file(vertical_dim+str(year), merged_figure, None, True)
        plot_dicts[vertical_enum][year] = merged_figure

tab_plots = []
for (vertical_enum,vertical_dim) in enumerate(vertical_dims):    
    tab_plots.append( hv.HoloMap(plot_dicts[vertical_enum], kdims='Year').collate().opts( toolbar=None, shared_axes=False) )

save_file('TheReferenceModelHistory', tab_plots, vertical_dims, 'The Reference Model History')
If you can verify this is a bug that requires an issue, I will file it. I still hope that this is something silly on my side.