facebookresearch / hiplot

HiPlot makes understanding high dimensional data easy
https://facebookresearch.github.io/hiplot/
MIT License
2.74k stars 138 forks source link

How to enable the HiPlot Drag 'n' Drop option? #257

Closed kubernitos closed 1 year ago

kubernitos commented 1 year ago

Hello, I am trying to setup a local HiPlot server in my environment and I want it to operate exactly like in your example here: https://facebookresearch.github.io/hiplot/_static/hiplot_upload.html in a way that I'd be able to drag and drop a CSV file from my local computer to the site. I was only able to setup a site that would accept 'Experiments to load' likewise: image Couldn't find any documentation about enabling the 'Drag 'n' Drop' option so I'd be grateful if you could explain how you did that. Thanks in advance!

danthe3rd commented 1 year ago

Hi @kubernitos and thanks for opening this issue.

It is not currently possible. HiPlot either operates in a mode where it can take local inputs (eg with Drag n Drop), OR in a mode where the data is provided by the server (running it in server mode).

I'm curious about what you are trying to achieve - and why the public version of HiPlot does not work for you.

kubernitos commented 1 year ago

Hi @kubernitos and thanks for opening this issue.

It is not currently possible. HiPlot either operates in a mode where it can take local inputs (eg with Drag n Drop), OR in a mode where the data is provided by the server (running it in server mode).

I'm curious about what you are trying to achieve - and why the public version of HiPlot does not work for you.

The motive behind this is that the data I want to upload is sensitive and I can't use a public service that would store that information, so I need to have a private HiPlot server for that. Is there maybe a different solution?

danthe3rd commented 1 year ago

Sure this makes perfect sense :)

Just to clarify things, the HiPlot demo does not store any data (there is no server in fact, everything is running client-side on the web browser). If you want, you can build this demo yourself as well, like we do in the CI with:

from pathlib import Path
import hiplot

hiplot_upload_html = hiplot.render.make_experiment_standalone_page({'dataProviderName': 'upload'})
Path('hiplot_upload.html').write_text(hiplot_upload_html)

# Open the file "hiplot_upload.html" in your browser, or host it somewhere
kubernitos commented 1 year ago

Sure this makes perfect sense :)

Just to clarify things, the HiPlot demo does not store any data (there is no server in fact, everything is running client-side on the web browser). If you want, you can build this demo yourself as well, like we do in the CI with:

from pathlib import Path
import hiplot

hiplot_upload_html = hiplot.render.make_experiment_standalone_page({'dataProviderName': 'upload'})
Path('hiplot_upload.html').write_text(hiplot_upload_html)

# Open the file "hiplot_upload.html" in your browser, or host it somewhere

Thank you very much, was able to deploy it with that!