public/js
src_modules
aggregate.mjs +420 -0
baseUrlPlusQueryParams.mjs +0 -0
calculateTemperatureDiff.mjs +106 -0
chartColumn.mjs +6 -0
chartExport.mjs +9 -0
chartHeatmap.mjs +24 -9
chartLine.mjs +24 -8
chartScatterPlot.mjs +16 -4
fetchData.mjs +2 -194
getDatastreamId.mjs +95 -0
loadingIndicator.mjs +0 -0
appChart.js +215 -37
dropDownList.js +12 -9
index.html +1 -0
@@ -2,12 +2,12 @@
@@ -2,12 +2,12 @@
* Create 24-hour time strings for a time interval delimited by a start time and an end time. It is assumed that the start time is at "00:00:00" and the end time is at "23:45:00" (when the sampling rate of observations is 15 min) or "23:00:00" (when the sampling rate of observations is 60 min)
* @param {String} phenomenonSamplingRate The sampling rate of the phenomenon of interest represented as a string, e.g. "15 min", "60 min"
@@ -17,7 +17,9 @@ const createTimeStringsForInterval = function (phenomenonSamplingRate) {
@@ -17,7 +17,9 @@ const createTimeStringsForInterval = function (phenomenonSamplingRate) {
@@ -49,7 +51,7 @@ const createIso8601DateTimeString = function (
@@ -49,7 +51,7 @@ const createIso8601DateTimeString = function (
@@ -74,28 +76,22 @@ const getIndexOfTimestamp = function (inputTimestampArr, timestampOfInterest) {
@@ -74,28 +76,22 @@ const getIndexOfTimestamp = function (inputTimestampArr, timestampOfInterest) {
* Calculate the sum of observation values within a time interval delimited by a start date and end date. The start date may be the same as the end date.
* @param {Array} obsArray An array of observations (timestamp + value) that is response from SensorThings API
* @param {String} samplingRate The sampling rate of observations as a string, e.g. "15 min", "60 min"
@@ -117,27 +113,74 @@ const calculateSumOfObservationValuesWithinDatesInterval = function (
@@ -117,27 +113,74 @@ const calculateSumOfObservationValuesWithinDatesInterval = function (
* Calculate the sum of observation values within a time interval delimited by the start date and end date of a calendar month
* @param {Array} obsArray An array of observations (timestamp + value) that is response from SensorThings API
* @param {String} samplingRate The sampling rate of observations as a string, e.g. "15 min", "60 min"
@@ -146,6 +189,25 @@ const calculateSumOfObservationValuesWithinMonthInterval = function (
@@ -146,6 +189,25 @@ const calculateSumOfObservationValuesWithinMonthInterval = function (
@@ -155,7 +217,7 @@ const calculateSumOfObservationValuesWithinMonthInterval = function (
@@ -155,7 +217,7 @@ const calculateSumOfObservationValuesWithinMonthInterval = function (
@@ -163,7 +225,7 @@ const calculateSumOfObservationValuesWithinMonthInterval = function (
@@ -163,7 +225,7 @@ const calculateSumOfObservationValuesWithinMonthInterval = function (
@@ -173,7 +235,7 @@ const calculateSumOfObservationValuesWithinMonthInterval = function (
@@ -173,7 +235,7 @@ const calculateSumOfObservationValuesWithinMonthInterval = function (
@@ -181,7 +243,7 @@ const calculateSumOfObservationValuesWithinMonthInterval = function (
@@ -181,7 +243,7 @@ const calculateSumOfObservationValuesWithinMonthInterval = function (
@@ -189,6 +251,130 @@ const calculateSumOfObservationValuesWithinMonthInterval = function (
@@ -189,6 +251,130 @@ const calculateSumOfObservationValuesWithinMonthInterval = function (
* @param {Array} obsArray An array of observations (timestamp + value) that is response from SensorThings API
@@ -227,8 +413,8 @@ const extractUniqueCalendarMonthsFromCalendarDates = function (
@@ -227,8 +413,8 @@ const extractUniqueCalendarMonthsFromCalendarDates = function (
File renamed with no changes. Show file contents
+ 106
- 0
* @param {Array} calendarDatesMonthsStrArr An array of unique calendar dates strings (in "YYYY-MM-DD" fromat) or unique calendar months strings (in "YYYY-MM" format)
@@ -123,6 +127,8 @@ const drawColumnChartHighcharts = function (
@@ -123,6 +127,8 @@ const drawColumnChartHighcharts = function (
public/js/src_modules/chartExport.mjs
0 → 100644
+ 9
- 0