bwr_mentions_topics {brandwatchR}R Documentation

Get a dataframe of topic data for a specified Brandwatch query or query group

Description

Get a dataframe of topic data for a specified Brandwatch query or query group

Usage

bwr_mentions_topics(project_id = NULL, query_id = NULL,
  querygrp_id = NULL, date_range = c(Sys.Date() - 31, Sys.Date() - 1),
  order_by = NULL, limit = NULL, exclude_categories = NULL,
  exclude_tags = NULL, filters = NULL,
  token = Sys.getenv("BW_TOKEN"))

Arguments

project_id

The project id in which the specified query is contained. Obtain a list of project IDs using bwr_get_projects().

query_id

The query ID you'd like to see total mentions for. Note that you can only specify a query or a query group, not both.

querygrp_id

The query group ID you'd like to see total mentions for. Note that you can only specify a query or a query group, not both.

date_range

A character vector containing 2 date values in YYYY-mm-dd format. The first value is the beginning of your desired date range and the second value is the end of the date range.

order_by

Metric by which you wish to order the topics returned. Can be either 'volume' (the number of Mentions the topic appears in) or 'burst' (the rate that the topic has emerged over time).

limit

The maximum number of topics to be returned.

exclude_categories

You have the option to exclude Categories from the topics returned (this is often done in the Brandwatch Analytics UI).

exclude_tags

The authentication token, acquired using bwr_auth()

filters

(Optional) A list of key-value pairs to filter the mentions query by. Use the bwr_filters_get() function to find out all available filters.

token

The authentication token, acquired using bwr_auth()

Value

Returns a data frame (including some list-columns) of the JSON results, showing information about topics related to your query.

Examples

## Not run: my_project <- bwr_projects_get()$id[1]
my_query <- bwr_query_get(project_id = my_project)$id[1]
my_mentions <- bwr_mentions_topics(project_id = my_project,
                                   query_id = my_query,
                                   date_range = c('2018-01-01', '2018-02-01'))
## End(Not run)

[Package brandwatchR version 0.3.0 Index]