Collect: Collect data from social media for generating networks

Description Usage Arguments Value Author(s) See Also Examples

View source: R/Collect.R

Description

This function collects data from social media APIs, and structures the data into a data frame of class dataSource.*, ready for creating networks for further analysis. Collect is the second step of the Authenticate, Collect, Create workflow. This function is a convenient UI wrapper to the core CollectDataFrom* family of functions.

Usage

1
Collect(credential, ego = FALSE, ...)

Arguments

credential

credential object generated from Authenticate

ego

logical, collecting ego network data. Currently only support Instagram.

...

additional parameters for data collection (refer to CollectDataFrom* and CollectEgo* functions)

facebook: pageName, rangeFrom, rangeTo, verbose, n, writeToFile, dynamic

youtube: videoIDs, verbose, writeToFile, maxComments

twitter: searchTerm, numTweets, verbose, writeToFile, language

instagram: credential, tag, n, lat, lng, distance, folder, mindate, maxdate, verbose, sleep, writeToFile, waitForRateLimit

instagram with ego = TRUE: username, userid, verbose, degreeEgoNet, waitForRateLimit, getFollows

Value

A data.frame object of class dataSource.* that can be used with Create.

Author(s)

Chung-hong Chan <chainsawtiney@gmail.com>

See Also

CollectDataFromFacebook, CollectDataFromInstagram, CollectDataFromYoutube, CollectDatFromTwitter, CollectEgoInstagram

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.