bucketQuery: Bucket query a Numetric dataset (V2)

Description Usage Arguments Value

View source: R/bucketQuery.R

Description

Returns a dataframe with a list of bucket variable values, and the number of observations for each bucket.

This is especially useful when you have a dataset larger than 10,000 rows because it allows you to create a loop through the data getting only the data for each bucket.

This function uses the V2 version of the API.

Usage

1
2
3
bucketQuery(apiKey, datasetId, bucketVar, filterType = "none", filterField,
  filterValue, customFilterValue, must = "true", lowerBound, upperBound,
  childField, childOperation)

Arguments

apiKey

The API key, in quotes. You can find the API key in the settings after logging into Numetric

datasetId

The dataset ID, in quotes. The dataset ID can be found by using the getDatasets function, or by navigating to the dataset in Numetric, and selecting the string after the last forward slash.

bucketVar

The name of the dataset column, in quotes, that will be used to bucket the data.

filterType

The type of filter to apply. Options are "term", "range", "custom", or "none". Default value is "none".

filterField

The name of the column, in quotes, to use as a filter. This should not used when the filterType is "custom".

filterValue

This is only used when applying a term filter. The value in quotes, is what will be included. (If the must argument is set to "false", then this will be an exclude filter.) This should not used when the filterType is "custom".

customFilterValue

This is used in conjunction with a custom filterType. The format should be: "filter": "term", "field": "fieldName", "value": "value"

must

Whether the term filter is an include or excludes filter. By default it's set to "true", which is an includes filter. If set to "false", then it will be an excludes term filter.

lowerBound

This lower end of the range, lower boundary included, which is only specified when applying a range filter. The value, in quotes, should either be a date string formatted as "2017-06-02T00:00:00.000", or a number.

upperBound

This upper end of the range, upper boundary included, which is only specified when applying a range filter. The value, in quotes, should either be a date string formatted as "2017-06-02T00:00:00.000", or a number.

childField

The name of a column, in quotes, that you want to perform an operation on.

childOperation

The name of an operation (avg, sum, cardinality), in quotes, to perform on a child.

Value

Returns a dataframe.


RonGuymon/numetricAPI documentation built on May 6, 2019, 10:12 a.m.