LDAvis
R package for interactive topic model visualization.
Installing the package
If you are familiar with devtools, it is easiest to install LDAvis this way:
devtools::install_github("cpsievert/LDAvis")
Alternatively, you can decompress the zip ball or tar ball and run R CMD INSTALL
on it.
Using the package
Once installed and loaded, there are two 'main' help pages that implement the two main approaches of LDAvis:
-
?runShiny
: demonstrates some shiny-based examples. -
?createJSON
: demonstrates some static web page examples.
LDAvis demos
-
Associated Press demo: This webpage contains the raw html version of LDAvis, and shows a 40-topic model of news articles from the Associated Press.
-
Embed multiple visualizations into a static HTML page via knitr and rmarkdown. See the examples folder to see the source code.
-
Using mallet and LDAvis to model and visualize movie reviews.
-
Elife abstracts: A blog post by Carson about fitting a topic model to abstract from the open-access journal eLife. The Shiny version of LDAvis is embedded into this webpage.
Explanation and documentation:
To read about the methodology behind LDAvis, please see our paper, which will be presented at the 2014 ACL Workshop on Interactive Language Learning, Visualization, and Interfaces in Baltimore on June 27, 2014.