sgsinclair / Voyant

GNU General Public License v3.0
208 stars 53 forks source link

Way to save an analysis locally and resume work later? #524

Open matthiasdusch opened 3 years ago

matthiasdusch commented 3 years ago

Hi,

I try to build a local Voyant Server for researchers to work on large and/or sensitive corpora. The idea is, that this server shouldn't run all the time but can be started from a Docker container when it is needed by the researchers. This container would run on a university server, only be accessible to the one researcher who started it and then be stopped after the analysis. So far so good.

The problem/question is now: How could one save an analysis and continue work later? Or share work with a colleague?

In my mind the ideal way would be the possibility to save the whole project (corpus, analysis, current view, ...) into one file, which then can be loaded at a later stage again.

Do you think this is a realistic approach? Where/how would you start this? Or do you have a different perspective on this?

Thanks for any help and comments :-)

ajmacdonald commented 3 years ago

Hello Matthias,

I think the easiest way to do this would be to run it on your university server and restrict access to the URL. You could then use Voyant's export function to get a link to the corpus and view, e.g. https://voyant-tools.org/?corpus=shakespeare&panels=cirrus,reader,documentterms,summary,correlations

When you say "analysis", what is it specifically in Voyant that you want to save and continue work on?

Andrew

matthiasdusch commented 3 years ago

Hi Andrew, thanks for your answer.

I think when I say "save the analysis" I basically mean the corpus, the current view and all edits/settings done to the current view. E.g. if I increase the amount of terms in the cirrus cloud and/or change the scale to only use a subset of the corpus and then export again, I will have to do these steps again the next time, right? Also if I use several custom tools in one location (e.g. cirrus, bubbles and knots in the upper left corner) and hit export, it would still only save the currently active one and replace the other two with "Terms" and "Links".

The problem is also that my researchers are used to work with save and load buttons like in MS Word: Edit something->save. Want to continue working on something-> load.

In my mind I ideally would have a save button in Voyant which would write a file (something like a xml or json) which would specify the corpus, all currently used tools and their respective settings. And upon loading that file it would resume that exact view with all settings.

I would like to implement that and will spend a couple of hours on trying. But to be honest I am not an experienced JavaScript developer so I am not sure how far I will get. That's also why I am gracious for every advice where to start. Or also feedback like: That will not work because of XYZ.

Best, Matthias

ajmacdonald commented 3 years ago

Hi Matthias,

Thanks for the additional info, I think I understand now.

This is something that I agree would be useful to have, however I think it would require more than a couple hours of work. The JS library that Voyant makes extensive use of does have support for saving and loading state information so I could build something on top of that for Voyant. Unfortunately I only have limited time and I can't really prioritize this at the moment.

While this won't help with reloading settings, you could create a "custom set" of tools. Look at https://github.com/sgsinclair/Voyant/blob/master/src/main/webapp/app/panel/CorpusSet.js (which is the default Voyant view) and https://github.com/sgsinclair/Voyant/blob/master/src/main/webapp/app/panel/CollocatesSet.js for examples.

Andrew

matthiasdusch commented 3 years ago

Hi Andrew, sorry for the late response.

I appreciate adding the 'feature' label to that issue. I really think it would be a useful addition to Voyant Tools, both .org and locally hosted servers. It is basically the only "complained" I heard from researchers around here.

I personally won't pursue that exact task as it is above my level of comfort in JS. But I will have a look at the custom tool sets.

Thanks

gerhardvanh commented 3 years ago

The problem is also that my researchers are used to work with save and load buttons like in MS Word: Edit something->save. Want to continue working on something-> load.

As a researcher, I would like to confirm Andrew's assumption. It is still rather confusing to me (as a new user) how to make sure that all my searches and analyses will be still available when I get back to my corpus work a few days from now. I get it that I can export a URL and save that URL, but it is still a bit counterintuitive for me :-)

This also seems to relate to some extent to issue #430.

Thanks Gerhard