TimberVis Flexiboard: Visualization and Exploration Flexiboard for Timber Buildings IoT data sensors. The pulse of the wood Monitoring of Wooden houses: Time series of sensors data measuring humidity, temperatures, vibrations and weather conditions. https://lnu.se/forskning/forskningsprojekt/projekt-flexiboard-for-visualisering-och-utforskning-av-trabyggnader/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
infravis-trahust/web-html/z_FORMATS_NEEDED.js

155 lines
6.2 KiB

///
// Data formats needed for each the the three diagrams:
// for all the three cases I include dinamycally JS files that content variables
// as arrays. I do this intead of loading CSV values
// IS THIS CORRECT OR BETTER WE MOVE TO LOAD csv?
/////////////////////////////////////////////////////
// tHE THREE DIAGRAMS ARE: pARALLEL, gRID AND hORIZON:
//////////////////////////////////////////
/// 1.PARAllel
// This var is The data. First row gives the positions for the sensors
// of the famimlly (wall depth).
// Then, the raw data is taked as it is but selecting the grup of columns that represent a familly of sensors.
// The example that follows show a sensors-family of 6 sensors at the positions pos_1
sample = [
["pos1", 5, 10, 25, 35, 42, 45],
["2023-01-01 00:10:07", 26.2, 33, 49.5, 53.1, 62.9, 87],
["2023-01-01 00:20:05", 26.5, 33.2, 60.5, 71.3, 78.3, 91.7],
["2023-01-01 00:30:05", 26.7, 33.7, 49.7, 53.7, 63.5, 86.1],
["2023-01-01 00:40:05", 26.6, 33.5, 49.6, 53.6, 63.5, 86.3],
["2023-01-01 00:50:05", 26.6, 33.5, 49.6, 53.5, 63.4, 86.5],
["2023-01-01 01:00:05", 26.5, 33.4, 49.6, 53.5, 63.3, 86.6],
["2023-01-01 01:10:05", 26.4, 33.3, 49.6, 53.4, 63.2, 86.6],
["2023-01-01 01:20:05", 26.3, 33.2, 49.5, 53.3, 63.1, 86.7],
["2023-01-01 01:30:05", 26.3, 33.1, 49.5, 53.2, 63, 86.8]
];
// the xs variables are not depending on the data files.
// They just defina the tick points on the x-axis that are
// highlighted with a vertical axis. This is: they represent
// each sensor belonging to a familly of sensors at the same
// wall position but different depth.
myxs = {
'2023-01-01 00:10:07' : 'pos1',
'2023-01-01 00:20:05' : 'pos1',
'2023-01-01 00:30:05' : 'pos1',
'2023-01-01 00:40:05' : 'pos1',
'2023-01-01 00:50:05' : 'pos1',
'2023-01-01 01:00:05' : 'pos1',
'2023-01-01 01:10:05' : 'pos1',
'2023-01-01 01:20:05' : 'pos1',
'2023-01-01 01:30:05' : 'pos1'
}
> Sensors family selection
//Michael Dorn wishes:
//--> MD:
// Categories:
// yearly - with 12 lines
// monthly - with 4 lines
// weekly - with 7 lines
// daily - with 24 lines
//
// Settings:
// yearly: date: 1st of the month; time: 12:00;
// allow for chosing a different date/time
// monthly: date: choose days 1/8/15/22/29; time; 12:00;
// allow for chosing different date/time
// daily: time: 0-1-2-3-...-23;
// allow for chosing different date/time
//
// Is it possible to allow to supress a line then (hide it)?
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
////// 2.GRID
// it is just a column of the original raw data. At the moment is saved in a JS file as an array with the var name of the original column
// example:
var Temp_MP1_1_Pos4 = [
[11.01, 11.02, 11.01, 11.02, 11.02, 11.01, 11.00, 11.00, 11.02, 11.00, 11.01, 11.00, 11.00, 10.99, 10.99, 10.98, 10.96, 10.97, 10.96, 10.97, 10.96, 10.95, 10.94, 10.94, 10.94, 10.94, 10.94, 10.92, 10.91, 10.90, 10.91, 10.88, 10.88, 10.88, 10.88, 10.86, 10.84, 10.83, 10.82, 10.82, 10.79, 10.78, 10.75, 10.76, 10.74, 10.72, 10.73, 10.71, 10.69, 10.66, 10.66, 10.64, 10.64, 10.60, 10.58, 10.55, 10.52, 10.52, 10.50, 10.48, 10.40, 10.32, 10.28],
['2023-01-01', '2023-01-02', ...],
['00:01.34', '01:01', ...]
]
// IMPORTANT: Just one sensor
//Michael Dorn wishes:
//TIME periods:
// - yearly - 365 days; 12 rows with 28-31 days; at 12:00;
// - monthly - 28 days; 4 rows with 7 days; at 12:00;
// - can this be arranged like in calendar view?
// - weekly - 7 days; one per day at ##:00;
//
// Scale: is it possible here to chose if an actual time is shown or to have the max/min value within a day for the yearly/monthly versions?
//
//
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
////// 3.HORIZON
// The horizon chart has several rows. As it is now, firstly it is defined
// an array of columns from the raw DataTransfer, that will become rows at the horizon chart.As
// so, a list of rows will be:
datas = ["S1:1", "S1:2", "S1:3", "Temp_MP1_1_Pos4", "Temp_MP1_1_Pos5", "Temp_MP1_1_Pos6", "Temp_MP1_2_Pos1", "Temp_MP1_2_Pos2", "Temp_MP1_2_Pos3", "Temp_MP1_2_Pos4", "Temp_MP1_2_Pos5", "Temp_MP1_2_Pos6"];
// And then the values for each row, that comes directly from the raw data columns
// example for the first row "Temp_MP1_1_Pos1"
var Temp_MP1_1_Pos1=[18.71, 18.74, 18.75, 18.76, 18.78, 18.77, 18.77, 18.78, 18.76, 18.77, 18.77, 18.78, 18.78, 18.76, 18.75, 18.75, 18.75, 18.76, 18.78, 18.76, 18.74, 18.74]
// This list can be long. This kind of chart use to represent a big amount og points for each column. Hence, covering a long time period.
// > (Vertical axis) Select a list of sensors
//Michael Dorn wishes
// Horizontal axis:
// Categories:
// year 365 days at 0/6/12/18 h --> 1460 points
// month 28-31 days at 0/1/2/.../23 h --> 744 points
// week 7 days at 0:00/0:15/0:30/... 23:45/24:00 --> 672 points
// day 24 hours all datapoints --> up to 288 points
// Scale:
// it would be good of the width if the browser window is not overflowing sideways
//
//
// vertical axis:
// Temperature:
// - in what steps in °C are you thinking?
// - I expect to have at the most -30°C - +50°C for the weather station
// - can the scale be chosen? E.g. there are steps of 10°C or of 5°C or others?
//###################################
// From Micheal about Naming:
// I attach two files:
// Explanation datafiles.xlsx
// The colored rows on top include channel names / families / units / # of column / ...
// The first part in the name of the channel gives what type of value is measured:
// - temperature (Temp_...)
// - humidity (RH_...)
// - relative dispalcement (RelDisp_...)
// - absolute displacement (AbsDisp)
// - air pressure (AirPres_...)
// - the weather station has many different values
// A row with units is also given.
// Explanation datafiles.pptx
// - Includes information where the sensors and families are located.
// - The last slide includes the distance for the sensors in the walls. Measurement start at the inside of the wall.
// I hope this helps you immediately!