map: Visualise your account

Description Usage Arguments Details Author(s) See Also Examples

Description

Return edge list of objects in the authenticated user's account, to help one visualise campaigns, adsets, ads and audience templates.

Usage

1
map(campaigns, adsets, ads, audiences)

Arguments

campaigns

Data frame of campaigns as returned by listCampaigns

adsets

Data frame of campaigns as returned by listAdsets

ads

Data frame of campaigns as returned by listAds

audiences

Data frame of campaigns as returned by listAudiences

Details

Maps the network of object under the authenticated user, follows the typical advertising structure.

Under the uaudthenticated user are campaigns, under campaigns lie adsets to which audience targeting templates and ads belong.

Author(s)

John Coene jcoenep@gmail.com

See Also

orionOAuth, listAudiences, listCampaigns, listAdsets, listAds

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## Not run: 
# authenticate
orionOAuth(client.id = 0000,
           client.secret = "0x00000000x00x0x000xxx0000x0xx0")
           
# list required objects
ads <- listAds(n = 500)
adsets <- listAdsets(n = 500)
campaigns <- listCampaigns(n = 500)
audiences <- listAudiences(n = 500)

network <- map(campaigns, adsets, ads, audiences)

# plot with igraph
# plot ids
g <- igraph::graph.data.frame(network[,1:2], directed = TRUE)
plot(g)

# plot names
g <- igraph::graph.data.frame(network[,3:4], directed = TRUE)
plot(g)

# plot with networkd3
networkD3::simpleNetwork(Data = network, Source = "source.name", 
                         Target = "target.name")

## End(Not run)

JohnCoene/oRion documentation built on June 13, 2019, 12:44 p.m.