| Type: | Package | 
| Title: | Interface to the 'Datorama' API | 
| Version: | 0.1.0 | 
| URL: | https://github.com/beigebrucewayne/datoramar | 
| BugReports: | https://github.com/beigebrucewayne/datoramar/issues | 
| Description: | A thin wrapper around the 'Datorama' API. Ideal for analyzing marketing data from https://datorama.com. | 
| License: | MIT + file LICENSE | 
| Encoding: | UTF-8 | 
| LazyData: | true | 
| Imports: | httr, jsonlite, tibble | 
| RoxygenNote: | 6.0.1 | 
| NeedsCompilation: | no | 
| Packaged: | 2017-12-20 04:49:58 UTC; Kade.Killary | 
| Author: | Kade Killary [aut, cre] | 
| Maintainer: | Kade Killary <kadekillary@protonmail.com> | 
| Repository: | CRAN | 
| Date/Publication: | 2017-12-20 15:42:51 UTC | 
A query constructor for the Datorama API
Description
A query constructor for the Datorama API
Usage
datorama_query(token = NULL, brandId = NULL, dateRange = c("CUSTOM",
  "CUSTOM_ON_GOING", "YESTERDAY", "WEEK_TO_DATE", "BI_WEEK_TO_DATE",
  "MONTH_TO_DATE", "QUARTER_TO_DATE", "YEAR_TO_DATE", "WEEK_TO_DATE_CUSTOM",
  "BI_WEEK_TO_DATE_CUSTOM", "MONTH_TO_DATE_CUSTOM", "QUARTER_TO_DATE_CUSTOM",
  "YEAR_TO_DATE_CUSTOM", "PREV_WEEK", "PREV_BI_WEEK", "PREV_MONTH",
  "PREV_QUARTER", "PREV_YEAR", "PREV_WEEK_CUSTOM", "PREV_BI_WEEK_CUSTOM",
  "PREV_MONTH_CUSTOM", "PREV_QUARTER_CUSTOM", "PREV_YEAR_CUSTOM", "LAST_WEEK",
  "LAST_BI_WEEK", "LAST_MONTH", "LAST_3_MONTHS", "THIS_WEEK",     
  "THIS_BI_WEEK", "THIS_MONTH", "THIS_QUARTER", "THIS_YEAR", "THIS_WEEK_CUSTOM",
  "THIS_BI_WEEK_CUSTOM", "THIS_MONTH_CUSTOM", "THIS_QUARTER_CUSTOM",
  "THIS_YEAR_CUSTOM"), startDate = NULL, endDate = NULL,
  measurements = NULL, dimensions = NULL, groupDimensionFilters = NULL,
  stringDimensionFilters = NULL, stringDimensionFiltersOperator = NULL,
  numberMeasurementFilter = NULL, sortBy = NULL, sortOrder = NULL,
  topResults = NULL, groupOthers = NULL, topPerDimension = NULL)
Arguments
| token | A string containing your token for authentication. Get in  | 
| brandId | A string containing the Brand ID | 
| dateRange | A string containing date range for query | 
| startDate | A string -> format YYYY-MM-DD | 
| endDate | A string -> format YYYY-MM-DD | 
| measurements | A list of lists including attributes to include -> list(list(name = "Investment")) | 
| dimensions | A list of dimensions to be included -> list("Day", "Site Name") | 
| groupDimensionFilters | A list of lists including dimension, operator -> "IN", "NOT IN", and vals for filtering | 
| stringDimensionFilters | A list of lists including dimension, operator -> "EQUALS", "NOT_EQUALS", "NOT_EQUALS_CASE_SENSITIVE", "CONTAINS", "NOT_CONTAINS", "STARTS_WITH", "ENDS_WITH", "IS_EMPTY", "IS_NOT_EMPTY", and val for filtering | 
| stringDimensionFiltersOperator | A string for string dimension filtering -> "AND", "OR" | 
| numberMeasurementFilter | A list of lists including filedName (measurement name), operator -> "EQUALS", "NOT_EQUALS", "GREATER", "GREATER_EQUALS", "LESS", "LESS_EQUALS", "IS_NULL", "IS_NOT_NULL", "IS_NAN", "IS_NOT_NAN" and val for filtering | 
| sortBy | A string including name of dimension/measurement to sort by | 
| sortOrder | A string containing the order of the sort -> "ASC", "DESC" | 
| topResults | A string containing the number of results to return | 
| groupOthers | Boolean determining whether to group all results not in topResults | 
| topPerDimension | Boolean determining whether to return topResults per dimension | 
Value
A tibble with the query's response
Examples
## Not run: 
datorama_query(token = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
               brandId = "271",
               dateRange = "CUSTOM",
               startDate = "2017-11-01",
               endDate = "2017-11-20",
               measurements = list(list(name = "Clicks"),
                              list(name = "Impressions")),
               dimensions = list("Day", "Site Name")
)
## End(Not run)
Authenticating yourself to Datorama
Description
Authenticating yourself to Datorama
Usage
datorama_token(email, password)
Arguments
| email | A string containing the email associated with your Datorama account | 
| password | A string containing the password associated with your Datorama account | 
Value
A string with your our API token
Examples
## Not run: 
datorama_token("someEmail@gmail.com", "password1234")
## End(Not run)