Commit e50e245c authored by Sven Schneider's avatar Sven Schneider
Browse files

minor. removed unused function from aggregation.js.

parent 49b24fe4
......@@ -25,26 +25,6 @@ function convertArray2JSON(arr) {
}
function createDateFromDateTimeString(jsonData) {
let datx = [];
let daty = [];
const MONTH = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
for (var u = 0; u < jsonData.length; u++) {
daty.push(jsonData[u].temperature);
let date = new Date(jsonData[u].datetime);
let datum = date.getDate();
let month = MONTH[date.getMonth()];
let hour = date.getHours() + ":00";
let newDateStr = datum + "/" + month + "-" + hour;
datx.push(newDateStr);
}
return [datx, daty];
}
/**
* Format the response from SensorThings API to make it suitable for heatmap
* @param {Array} obsArray Response from SensorThings API as array
......
......@@ -343,8 +343,8 @@ const activate3DTileFeaturePicking = function() {
console.log(err);
})
.then((observationArr) => {
var agg = aggregateResponse(observationArr, 0, 'min');
console.log(agg);
var agg = aggregateResponse(observationArr, 0, 'mean');
// console.log(agg);
drawHeatMapHC(formatSTAResponseForHeatMap(agg));
drawLineChartHC(formatSTAResponseForLineChart(agg));
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment