Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 04:58
    MarcSkovMadsen edited #1813
  • 04:57
    MarcSkovMadsen labeled #1813
  • 04:57
    MarcSkovMadsen opened #1813
  • 04:49
    MarcSkovMadsen labeled #1812
  • 04:49
    MarcSkovMadsen opened #1812
  • 04:41
    MarcSkovMadsen edited #1811
  • 04:40
    MarcSkovMadsen labeled #1811
  • 04:40
    MarcSkovMadsen opened #1811
  • 04:31
    MarcSkovMadsen labeled #1810
  • 04:31
    MarcSkovMadsen opened #1810
  • 04:17
    MarcSkovMadsen labeled #1809
  • 04:17
    MarcSkovMadsen opened #1809
  • 04:10
    MarcSkovMadsen edited #1808
  • 04:09
    MarcSkovMadsen labeled #1808
  • 04:09
    MarcSkovMadsen opened #1808
  • 04:02
    MarcSkovMadsen labeled #1807
  • 04:02
    MarcSkovMadsen opened #1807
  • 03:47
    jbednar commented #970
  • 02:03
    nritsche commented #1806
  • 01:44
    nritsche opened #1806
Marc Skov Madsen
@MarcSkovMadsen
Jacob Barhak
@Jacob-Barhak
Does anyone know how to conceal a large static html file generated by panel as another file? I have an issue with Netlify no longer supporting html files that take more than 30 seconds to load - apparently if I disguise them as non html it should work. Does anyone have an idea how to do it? Here is a link to the entire discussion: https://community.netlify.com/t/large-html-static-files-stopped-working-recently/23359 I am trying to avoid regeneration of the files that worked. I hope you have ideas.
And @jbednar , please check your email and give me an answer about the tutorial - I just need to know how to proceed, whatever your answer is.
Jacob Barhak
@Jacob-Barhak
The Netlify community found that files generated by panel are have some errors of missing map files. What does this mean? Can this be avoided. I am sending a screenshot found
unnamed.jpg
Jacob Barhak
@Jacob-Barhak
How do I force using matplotlib backend with holoviews rather than bokeh when I create holoviews plots that are later svaed by panel save. The following code generated bokeh figure even if I explicitly ask for matplotlib:
data = {}
data['Year'] =    [2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, ]
data['Cohorts'] = [  22,   34,   40,   47,   47,   91,   91,  123,  123, ]

holoviews.extension('matplotlib')
plot1 = holoviews.Scatter(data, kdims=['Year'], vdims=['Cohorts'], backend='matplotlib')
#
# I make a few more plots here - some are bokeh plots
# then I finish with
section3_2_1_right = panel.pane.HoloViews(plot1, width=400, height=170)
Am I using a proper syntax?
James A. Bednar
@jbednar
I don't think backend='matplotlib' does anything there; the backend is determined at the display or output stages, not during Element creation. Not sure why that's not an error, though.
And Panel is always based on Bokeh, so the full panel can only be Bokeh based. You should be able to set it up to render individual plots using Matplotib, though.
Jacob Barhak
@Jacob-Barhak
Thanks @jbednar , so I I want to show a maptplotlib plot and bokeh plot next to each other on different panels, how can I do this? I am trying to add this to the tutorial next week so people can see that Holoviews can handle multiple backends, yet if it is too complex, I will just use bokeh.
By the way, I plan to release the tutorial under CC0 - do you have any objections? I can use another open source license, yet I think CC are best for tutorials - since I put your name on the presentation, I rather you approve - I will put it on Gihub when it looks better - probably by tomorrow. Yet I want to know you are ok with the license.
James A. Bednar
@jbednar
No problem. I haven't tried that, but I'd guess it's something like pn.Row(hv.output(plot1, backend='bokeh'), hv.output(plot1, backend='bokeh'), where you probably have to pass some arguments to hv.output to specify you want a figure output rather than html, etc. @philippjfr would know...
Jacob Barhak
@Jacob-Barhak
Thanks @jbednar , problem solved - this actually works, the backend has to be specified at the panel level, and there is a warning - I just missed in among all the warnings the system shows - it tells me it does not recognize backend by Holoviews - This is good. If I move fast enough I will post the tutorial skeleton on Github under CC0 by tonight.
Jacob Barhak
@Jacob-Barhak
image.png
James A. Bednar
@jbednar
Cool!
Jacob Barhak
@Jacob-Barhak
Well @jbednar - not really - there are red boxes around the markdown text - no idea why - I am trying to figure it out now. not sure why they appear.
Jacob Barhak
@Jacob-Barhak
And @jbednar - this is odd, notice how markdown code section is shown once with red outline and once as colored keywords - this is at the markdown library level, yet it is very odd - I will investigate if this can be controlled.
James A. Bednar
@jbednar
Seems odd.
Jacob Barhak
@Jacob-Barhak
Yes,, Very odd, it happens every once in a while - not sure when - here is another example
image.png
I will go on and figure this out when everything is ready - it worked before so its a minor issue that can be taken care of.
Jacob Barhak
@Jacob-Barhak
Problem with code highlight is not really a problem - the markdown library supports different highlight for different languages. So to get python highlight one should use : ''''python
hoangthienan95
@hoangthienan95
Hi everyone, does hvplot support heatmap with datashading? Could not find an example in the docs and adding datashade=True to the examples in here causes an error. About to file github issue but just wanna double check
James A. Bednar
@jbednar
Datashader output is already a heatmap of sorts, so it depends what you mean.
Usually you'll add datashade=True on whatever your original data was, not on .heatmap.
So e.g. .hvplot.scatter(... datashade=True), etc.
Once it's already a heatmap there's not much left for Datashader to do, as basically what Datashader does is to make heatmaps!
hoangthienan95
@hoangthienan95
image.png
Ah, so if my data looks like this, and I want to visualize this giant heatmap
then I just do .heatmap(columns="columns", index="index") right?
I ask bc when zooming in it is slow, so I thought it was somehow not optimized yet
maybe I just need to connect to a more powerful dask backend and turn that matrix to a dask dataframe then call the heatmap function again?
James A. Bednar
@jbednar
You could plot that with Datashader by creating an image out of it and datashading that (not sure how in .hvplot, but in HoloViews it's hv.Image(...)), but that requires you to throw away your categorical axes and replace them with numerical ones. Datashader only knows about numerical axes. If there is some reasonable ordering, then maybe that makes sense. If there's no ordering, there's no point in such a viz, as Datashader would then be aggregating across adjacent columns and rows that have nothing in common.
Whether it's Dask or Pandas or Numpy doesn't matter; whether it's categorical data does matter. If you can map from categorical data into numeric data, then Datashader can handle it. If not, it has no idea what to do with your categorical x and y axes; it's built for continuous variables on x and y (though it does support categories on z, i.e. stacked up together).
Zooming in won't really help if the data has no structure; if it's truly categorical in x and y you just have to deal with the data in chunks somehow, because categorical data isn't meaningful without a label.
hoangthienan95
@hoangthienan95
But then will I be getting the dynamic recomputation as I zoom in to inspect finer-grained patterns?
James A. Bednar
@jbednar
There aren't any finer grained patterns unless the axes are sorted in some meaningful way.
It would just be meaninglessly grouping unrelated values.
Datashader can handle when the data has spatial structure (in whatever space you are plotting things in). Without spatial structure, zooming is not meaningful.
hoangthienan95
@hoangthienan95
ok so something like hierarchichally clustering the rows and columns and rearrange them would help, because I do expect patterns from that
James A. Bednar
@jbednar
Sure, at which point you can replace the category axis with some similarity metric value.
But then you'll want to reveal categories when you've zoomed in to individual data points, which I guess you can do with hover.
It would be great to add something to the examples where we show that whole process, i.e. starting with categorical axes, clustering the data to give spatial structure, then displaying the datashaded result with some way of indicating underlying categories (with colors plus hover, etc.) That would make a nice example, but it's a good bit of work, with lots of assumptions along the way. In no way would that get packaged up as .hvplot.heatmap(... , datashade=True). :-)
It's somewhat similar to https://examples.pyviz.org/iex_trading/IEX_stocks.html, where zooming in reveals individual stock trades, and zooming out reveals patterns; you'd need some similar approach, plus the clustering.
hoangthienan95
@hoangthienan95
I'll check that out thanks. "Visualizing interactive heatmap with hierarchical clustering with more than 1k cols and rows" seems a good weed out interview question. I have not found a way to do that easily so far
James A. Bednar
@jbednar
:-)
hoangthienan95
@hoangthienan95
does hvplot has a way that I can insert in a dendrogram?
James A. Bednar
@jbednar
I don't think so.
hoangthienan95
@hoangthienan95
because it would be helpful to see which ones are in the same group