What’s the best way to return the standard deviation between two or more tags over the last 5 days?
I’m able to do this for the standard deviation for individual tags like this:
endTime = system.date.now() startTime = system.date.addMinutes(endTime, -5040) dataSet = system.tag.queryTagHistory(paths=['[default]TempA', '[default]TempB'], startDate=startTime, endDate=endTime, returnSize=1, aggregationMode="StdDev", returnFormat='Wide') pyData = system.dataset.toPyDataSet(dataSet) for row in pyData: for value in row: print(value)
But is there a way to get the standard deviation for both tags (or three etc)? Or would I need to do that with another function after I grab the data from each tag?
My goal is trying to get the standard deviation of temperature sensors in my house over the past 7 days so I can track if things I do (like turning on fans more) effect it. Not the most scientific method since there are other variables (mainly outside temp), but thought it might be an interesting number to look at. Thanks for your help!