Transforms

While for the most part, heedy transforms are extremely simple to use, they are actually part of a powerful time-series analysis language called PipeScript.

List of Transforms

The following is a list of all transforms built into PipeScript & Heedy. Click on a transform to see details and examples of use.


NameDescription
$Represents the current datapoint. It is the identity transform.
alltrueReturns true if all datapoints seen have been true, otherwise returns false
anytrueReturns true if at least one of the datapoints seen was true
bucketPuts numbers into custom-sized buckets. Useful for histograms.
changedReturns true if the datapoint has a different value from the previous one
containsReturns true if the given string is found in the datapoint string
countreturns the total number of datapoints in the stream
dayReturns the number of days since Jan 1 1970 in the given time zone.
dayhourReturns the hour in a day during which the datapoint happened.
distanceReturns distance in meters from given latitude/longitude coordinates to datapoint
dtGives access to the datapoint's duration
endswithReturns true if datapoint string ends with the substring given in arg
filterFilters all datapoints that do not pass the given conditional
firstReturns true if first datapoint of a sequence, and false otherwise
hourReturns the number of hours since Jan 1 1970 in the given time zone.
iGives array index of the timeseries
lastReturns true if last datapoint of a sequence, and false otherwise
lengthReturns the length of an array/string, or number of object keys.
mapSplits the timeseries by the first arg, and returns an object where each key is the result of running the pipe in the transform in the second arg on the split series
maxReturns the maximum datapoint in the timeseries
meanFinds the mean of the timeseries data
minReturns the minimum datapoint in the timeseries
monthReturns the number of months since Jan 1 1970 in the given time zone.
monthdayReturns the number of day in the datapoint's month (int)
reduceTakes a json object, and considers each field to be a separate datapoint's data. It then runs the transform in its argument over the elements
regexReturns true if the given regular expression matches the data string
startswithReturns true if datapoint string starts with the substring given in arg
sumSums data
tGives access to the datapoint's timestamp
tshiftShift the datapoint timestamp by a constant number of seconds
urldomainReturns the domain name/host that is used in the given url
wcReturns the number of words in the given string
weekReturns the number of weeks since Jan 5 1970 (First Monday after unix time) in the given time zone.
weekdayReturns the weekday during which the datapoint happened ('Monday','Tuesday'...)
whileEquivalent to a while loop that runs while the first argument is true. Restarts the loop when the argument is false.
yearReturns the year of the datapoint in the given time zone.
yeardayReturns the day of the year during which the datapoint happened [1,365] non-leap, and [1,366] for leap years.
yearmonthReturns the month name during which the datapoint happened ('January','February'...)