Create: Create networks from social media data

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/Create.R

Description

This function creates networks from social media data (i.e. from data frames of class dataSource. Create is the final step of the Authenticate, Collect, Create workflow. This function is a convenient UI wrapper to the core Create*Network family of functions.

Usage

1
Create(dataSource, type = "Actor", ...)

Arguments

dataSource

a data frame of class dataSource

type

character, type of network to be created, currently supports "actor", "bimodal", "dynamic", "semantic" and "ego"

...

additional parameters for Create*Network functions

Details

Note: when creating Twitter networks, the user information can be collected separately using the PopulateUserInfo function and stored into the network as vertex attributes (this involves additional calls to the Twitter API).

Value

An igraph graph object

Author(s)

Chung-hong Chan <chainsawtiney@gmail.com>

See Also

CreateActorNetwork, CreateBimodalNetwork, CreateDynamicNetwork, CreateSemanticNetwork, CreateEgoNetworkFromData

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
require(magrittr)
## Instagram ego network example
myAppID <- "123456789098765"
myAppSecret <- "abc123abc123abc123abc123abc123ab"
myUsernames <- c("senjohnmccain","obama")

Authenticate("instagram",
appID = myAappId,
appSecret = myAppSecret) %>% Collect(ego = TRUE,
username = myUsernames) %>% Create

## YouTube actor network example
my_apiKeyYoutube <- "314159265358979qwerty"
videoIDs <- c("W2GZFeYGU3s","mL27TAJGlWc")

Authenticate("youtube",
apiKey = my_apiKeyYoutube) %>% Collect(videoIDs = videoIDs) %>% Create('actor')

## End(Not run)

SocialMediaLab documentation built on May 29, 2017, 9:41 p.m.