YaleDHLab / pix-plot

A WebGL viewer for UMAP or TSNE-clustered images
MIT License
593 stars 139 forks source link

Revisiting previously prepared data #244

Closed drjwbaker closed 2 years ago

drjwbaker commented 2 years ago

Potentially stupid question, but digging around issues like https://github.com/YaleDHLab/pix-plot/issues/74 it appears that after running pixplot against a dataset, a trace is left somewhere of that job. So my question is, after running pixplot against a dataset, viewing it at http://localhost:5000/output, and then - say - rebooting your PC, can you get back to the viz at http://localhost:5000/output without running pixplot against your data again?

pleonard212 commented 2 years ago

Hi James! Yes, you can re-visit the results, stored in the output folder, at any time. I usually do this from within the pixplot directory:

cd output; python -m http.server; cd..

After you stop the local web server with Control-C, this will place you back into the main pixplot folder. Tar/zip'ing the output folder, moving it to a production web server, and then uncompressing it there is a way to see the visualization on a "regular" web browser, accessible to the world (and with a normal port number.)

drjwbaker commented 2 years ago

Hey Peter! Got it, though python -m http.server 5000 points to http://localhost:5000/ this time (rather than http://localhost:5000/output/ like before), but I'll take it. Thanks!

pleonard212 commented 2 years ago

Ah yes, if you invoke the python server from the main pixplot directory (as opposed to cd'ing into the output directory), you will indeed get that extra level of directory in the URL. Everything should work the same, modulo the different URL.

When we move "built" pixplots into a production webserver, we rename the output folder to the name of the project or dataset, after we decompress it. That lets us have many different directories, such as http://pixplot.yale.edu/v2/mk and http://pixplot.yale.edu/v2/voguecovers .