Fetches brand information for accounts and for mention data. This is returned returned as a tibble. For account objects, this returns the brands that make up the account. For mention data, this returns the brands that are associated with the mention.
# S3 method for brandseyer2.account brands(x, ..., short = TRUE) # S3 method for list brands(x, ..., short = TRUE) brands(x, ...) # S3 method for data.frame brands(x, ..., ac = attr(x, "account"))
x | An object to fetch brand data for, such as an |
---|---|
... | Additional parameters for functions. |
short | Only show the most important brand information. |
ac | An optional account object from which to take brand information. |
A tibble of brand information
brandseyer2.account
: Read brands for only a single account
list
: Create a table of brands for the list of accounts given
data.frame
: Fetch brand information from a tibble of mention data.
root_brands()
for filtering to only the root brands of an account.
Constance Neeser
#> # A tibble: 5 x 5 #> id name parent deleted archived #> <int> <chr> <int> <lgl> <dbl> #> 1 1 Your Brand Here NA FALSE NA #> 2 2 Sibling Brand NA FALSE NA #> 3 5 So deleted NA TRUE NA #> 4 6 Brand of Christmas Past NA FALSE 1516710018. #> 5 3 Niece Brand 2 FALSE NA# Find deleted parent brands account("TEST01AA") %>% brands() %>% dplyr::filter(is.na(parent), deleted)#> # A tibble: 1 x 5 #> id name parent deleted archived #> <int> <chr> <int> <lgl> <dbl> #> 1 5 So deleted NA TRUE NA# Fetch phrases without using `phrases`` account("TEST01AA") %>% brands(short = FALSE) %>% dplyr::select(id, phrases) %>% dplyr::rename(brand.id = id) %>% tidyr::unnest_legacy(phrases) %>% dplyr::rename(phrase.id = id)#> # A tibble: 9 x 5 #> brand.id phrase.id query inactive deleted #> <int> <dbl> <chr> <lgl> <lgl> #> 1 1 1 brand FALSE TRUE #> 2 1 2 your brand FALSE FALSE #> 3 2 3 sibling FALSE FALSE #> 4 2 4 oh wow TRUE FALSE #> 5 5 101 brander FALSE FALSE #> 6 5 102 branded FALSE FALSE #> 7 6 101 brander FALSE FALSE #> 8 6 102 branded FALSE FALSE #> 9 3 5 niece FALSE FALSE#> # A tibble: 6 x 6 #> account id name parent deleted archived #> <chr> <dbl> <chr> <int> <lgl> <dbl> #> 1 TEST01AA 1 Your Brand Here NA FALSE NA #> 2 TEST01AA 2 Sibling Brand NA FALSE NA #> 3 TEST01AA 5 So deleted NA TRUE NA #> 4 TEST01AA 6 Brand of Christmas Past NA FALSE 1516710018. #> 5 TEST01AA 3 Niece Brand 2 FALSE NA #> 6 TEST02AA 100 The Best of Brands NA FALSE NA# Finding the brands and sub-brands that mentions matched. account("TEST01AA") %>% mentions("published inthelast week") %>% brands()#> # A tibble: 2 x 5 #> id brand.id parent name deleted #> <chr> <int> <int> <chr> <lgl> #> 1 2-1 2 NA Sibling Brand FALSE #> 2 2-1 3 2 Niece Brand FALSE