Date range
Ubidots allows you to build new variables from a time series based on date range data, that is, calculate mean, sum, median per hour, etc., using a synthetic variable based on your sensor inputs.
Last updated
Ubidots allows you to build new variables from a time series based on date range data, that is, calculate mean, sum, median per hour, etc., using a synthetic variable based on your sensor inputs.
Last updated
Below you can find the commonly used date range functions.
Returns the maximum value of the variable x in the specified date range.
Returns the minimum value of the variable x in the specified date range.
Returns the mean value of the variable x in the specified date range.
Returns the standard deviation of the variable x in the specified date range.
Returns the number of dots stored in the variable x for the specified date range.
Returns the last value of the time-series variable x in the specified date range.
Returns the first value of the time-series variable x in the specified date range.
Returns the sum of the dots stored in the variable x in the specified date range.
Date range functions have the following syntax:
aggregation_method(<variable>,<range>,<position>,<offset> )
Variable
It shows the measurements of a sensor as a of data points that vary over time. Also known as , it's identified by a variable label.
Variable label
YES
Range
The time window in wich the function will be computed.
NOTE: The selected range should be set in a way that evenly divides the next range. For example, if using minutes ("T"), whatever the number n is, it has to evenly divide an hour ("H"). Available values for minutes are: 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30. Other values may render unexpected results. Same applies to other ranges.
Available data ranges:
this is a positive integer, representing the number of observations used for each window or a time range specified as follows:
"nT" : Every n minutes
"nH" : Every n hours
"nD" : Every n days
"W" : Every end of week
"M" : Every end of month
YES
Position
Indicates whether the output value will be timestamped at the start of the time series or at the end.
position ="start" or position = "end"
NO
Offset
Sets the hour at which our synthetic variable engine will begin to compute the variable, which is the number of hours after midnight. By default, it's 0 hours.
Any integer between 1 and 23
NO