0

I created an LDAvis figure using the text2veec package in R. Tried but failed to save it to my local directory as the fully interactive webpage that it is.

I get either a blank page in my browser or a static when save thee figure with the following code and try to open it in my browser, from the local directory I saved it to:

DIR = "LDAvisual"
lda_model$plot(out.dir = DIR,               
               open.browser = interactive(), 
               as.gist = TRUE)
# now you can serve it from other session
servr::httd(DIR)

How can I view the fully interactive LDAvis plot that I saved from R to my directory in my browser? I realize you can get a markdown version, but I am interested in saving the fully interactive plot as a webpage and opening it from my directory (without the need for R) in my browser (preserving the fully interactive functions., e.g., switching between topics)

nigus21
  • 337
  • 2
  • 11
  • Does this answer your question? [Get LDAvis json from text2vec](https://stackoverflow.com/questions/51026117/get-ldavis-json-from-text2vec) – Dmitriy Selivanov Sep 09 '20 at 18:32
  • @DmitriySelivanov No. I would like to save the fully interactive webpage to my local directory, and then open it from directory in a browser (with all the interactive functions intact e.g., switching between topics, changing topics by moving the lambda slider etc.). I am not interested in a markdown, but rather a local directory file that I can open in my browser that works just like it does in R viewer (even when without having to open R to view it) - The fully interactive webpage I can share as an attachment in an email. Sorry for cross-posting to github, just wanted to make sure you get it. – nigus21 Sep 09 '20 at 19:48
  • seems you didn't read the answer: `lda_model$plot(out.dir = "topic_modeling_files/ldavis", open.browser = FALSE)` should solve you issue. – Dmitriy Selivanov Sep 10 '20 at 06:04
  • @DmitriySelivanov I read the answer and was able to save the topic model files to my directory - The code I posted in my question accomplishes that too. The issue still remains that when I open index.html file in my chrome browser, the resulting browser page is blank. Any suggestions? – nigus21 Sep 14 '20 at 22:02
  • @DmitriySelivanov Any thoughts on the question posted at the following stackoverflow link? – nigus21 Nov 13 '20 at 14:59

0 Answers0