This article plays through an exemplar workflow for creating a network of mentions.
We’ll use the example data in the ConnectR
package.
example <- ConnectR::mention_example %>%
dplyr::sample_n(100) %>%
dplyr::rename(followers = `twitter followers`, reach = `estimated reach`)
Radarly exports provide mentioned authors in a variable called
mentions
and separated by “;”
process = "radarly"
and
to = mentions
.
radarly_mentions <- example %>%
ConnectR::make_mention_network(process = "radarly",
from = author,
to = mentions,
size = followers,
colour = reach)
If the dataset doesn’t contain a mentions
variable, then
ConnectR can be used to try to extract mentions from the text
itself.
process = "extract"
and provide the
name of the text column in your data as the to =
argument.
extracted_mentions <- example %>%
ConnectR::make_mention_network(process = "extract",
from = author,
to = text,
size = followers,
colour = reach)
The default visualisation is interactive. You can:
ConnectR::viz_network(tbl_graph = radarly_mentions)
It’s also possible to create a static visualisation of the network in case this is necessary.
ConnectR::viz_network(tbl_graph = radarly_mentions,
type = "static",
label_prop = 0.2)
ConnectR::viz_network(tbl_graph = extracted_mentions)