Sampling and visualizing data feeds

Work in progress

As of May 12, we only visualize 4 readings in a 24 hour period. Regardless of how many data points there are. For example, if a sensor took a reading once per minute and had 1,440 readings - we’re not using 99% of them. Furthermore, the algorithm to choose which 4 to display is very basic. It only chooses the one closest to 2AM, 8AM, 2PM, and 8PM. All other data points are ignored.

 

Notes:

  • The SQL function selects the data point that is closest to the hour we want to display (potentially only from the previous time period - @Joyce Sato-Reinhold wasn’t sure)

  • The SQL function only grabs 1 selection from the time period

 

Variables:

 

Visual range = The length of the x-axis, e.g. 24 hours

Tick marks = The spacing of the label on the x-axis, e.g. every 6-hours

Display interval = The spacing of points on the chart, e.g. every 4 hours

Display interval point = The visualized output of the 16 data points, e.g. 7 degrees

Display interval data density = The number of data points in each interval, e.g. 16

Data density = The number of raw data points for the visual range, e.g. 96 points

 

 

For all data points between interval n and interval n+1, input all data points within that interval into a transformation function in order to get 1 output data point that is visualized. This is the centre point of the display interval. Repeat this process for each data interval within the visual range.

 

Algorithm 1 = Subdivision of the queried time range into a set number of intervals, with each interval containing a subset of the total data points.

 

Algorithm 2 = Transformation from many raw data points into a single data point for a given interval.