Skip to contents

Expand network

Usage

expand_net(
  net,
  keywords,
  token,
  refresh_tok,
  save_net = FALSE,
  file_name,
  threshold = 30,
  max_iterations = 50,
  sample_size = Inf
)

Arguments

net

tibble with network connections (edges). Assumed to contain two columns: actor_handle (the Blue Sky Social actor who is followING another) and follows_handle (the actor being followed).

keywords

character vector with keywords that we check for in actors' description to determine if they belong in the expanded network

token

character, token for Blue Sky Social API

refresh_tok

character, refresh token for Blue Sky Social API

save_net

boolean, should the net be saved incrementally as it is expanded? Useful for not losing work in case of unexpected interruptions. Defaults to FALSE

file_name

character, file name of the saved net. Defaults to 'dev/net/bignet_TIMESTAMP.rds'

threshold

numeric, the threshold for including actors in the expansion: How many followers must a prospect have, to be considered? If less then 1, interpreted as the fraction of the current net prospects must be followed by, to be considered. Defaults to 30.

max_iterations

integer, the maximum iterations in the network expansion. Defaults to 50

sample_size

integer, if we want to expand only with a sample of the prospects; can be useful for testing purposes. Defaults to `Inf´, e.g. every worthy prospect is included in the expansion.

Value

list with a) a tibble with the expanded network: actor_handle contains all network member, follows_handle contain all relevant actors that they follow (but not necessarily meeting the threshold.) b) a new token, c) a new refresh token – since the tokens might have beed refreshed while underway