umap_shiny | R Documentation |
Builds a Shiny app that can be used to label embedded texts quickly
umap_shiny(
data,
...,
text_var,
colour_var,
size = 2,
umap_height = 600,
x_var = V1,
y_var = V2,
type = "scattergl",
colour_mapping = NULL
)
data |
Data frame or tibble |
... |
Sent to select, allows you to include additional columns |
text_var |
Text variable |
colour_var |
Variable colur should be mapped to |
size |
The size of each point in the UMAP plot |
umap_height |
total height of UMAP plot |
x_var |
Variable with x axis co-ordinates |
y_var |
Variable with y axis co-ordinates |
type |
a string instructing what type of trace, "scattergl" can handle more points. |
colour_mapping |
A vector of hexcodes for colour mapping. |
shiny app
## Not run:
Example 1:
umap_shiny(data, permalink, sentiment, text_var = message, colour_var = cluster)
Example 2:
umap_shiny(data, text_var = text, colour_var = sentiment)
Example 3:
umap_shiny(data, text_var = mention_content, colour_var = entity, x_var = x, y_var = y)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.