run_btm | R Documentation |
Uses the BTM
package to run noun-based topic models in collections of short texts.
Uses udpipe
to tokenize and keep only nouns, proper nouns. The BTM output is then processed using
functions and calculations from the LDAvis
package.
run_btm(handle, data_source = c("timeline", "mentions"), n_topics, n_terms)
handle |
twitter handle without the |
data_source |
either timeline or mentions |
n_topics |
how many topics to model |
n_terms |
how many of the most salient terms to include for each topic |
The json file is included in the output if you want to visualize with LDAvis
or plots can be made with the x_phi output.
.rds file - x_phi is scaled x,y coordinates for topics, term_info is the top n terms;
both are based on lambda - 0.6; json is the json object from LDAvis
package
## Not run: run_btm("BMWUSA", data_source = 'timeline', n_topics = 40, n_terms = 30) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.