Description Usage Arguments Details Author(s) See Also Examples
Return edge list of objects in the authenticated user's account, to help one visualise campaigns, adsets, ads and audience templates.
1 | map(campaigns, adsets, ads, audiences)
|
campaigns |
Data frame of campaigns as returned by
|
adsets |
Data frame of campaigns as returned by
|
ads |
Data frame of campaigns as returned by
|
audiences |
Data frame of campaigns as returned by
|
Maps the network of object under the authenticated user, follows the typical advertising structure.
1User
2Campaigns
3Adsets
4Ads
4Audiences
Under the uaudthenticated user are campaigns, under campaigns lie adsets to which audience targeting templates and ads belong.
John Coene jcoenep@gmail.com
orionOAuth
, listAudiences
,
listCampaigns
, listAdsets
,
listAds
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.