Skip to content

Commit

Permalink
Contract Docs: (Chore) Some linting and timestamp formatting for heat…
Browse files Browse the repository at this point in the history
…map (#559)

data/contract_docs/heatmap.md
  • Loading branch information
kylebrandt committed Nov 13, 2022
1 parent 3b08931 commit 0384666
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 32 deletions.
20 changes: 9 additions & 11 deletions data/contract_docs/contract.md
Expand Up @@ -15,19 +15,17 @@ There are logical **_kinds_** (like Time Series Data, Numeric, Histogram, etc),
A **_data type_** definition or declaration in this framework includes both a kind and format. For example, "TimeSeriesWide" is: kind: "Time Series", format: "Wide".

* [Time series](./timeseries.md)
* [Wide](./timeseries.md#time-series-wide-format-timeserieswide)
* [Long](./timeseries.md#time-series-long-format-timeserieslong-sql-like)
* [Multi](./timeseries.md#time-series-multi-format-timeseriesmulti)
* [Wide](./timeseries.md#time-series-wide-format-timeserieswide)
* [Long](./timeseries.md#time-series-long-format-timeserieslong-sql-like)
* [Multi](./timeseries.md#time-series-multi-format-timeseriesmulti)
* [Numeric](./numeric.md)
* [Wide](./numeric.md#numeric-wide-format-numericwide)
* [Multi](./numeric.md#numeric-multi-format-numericmulti)
* [Long](./numeric.md#numeric-many-format-numericlong)
* [Wide](./numeric.md#numeric-wide-format-numericwide)
* [Multi](./numeric.md#numeric-multi-format-numericmulti)
* [Long](./numeric.md#numeric-many-format-numericlong)
* [Heatmap](./heatmap.md)
* [Buckets](./heatmap.md#heatmap-buckets-heatmapbuckets)
* [Scanlines](./heatmap.md#heatmap-scanlines-heatmapscanlines)
* [Sparse](./heatmap.md#heatmap-sparse-heatmapsparse)


* [Buckets](./heatmap.md#heatmap-buckets-heatmapbuckets)
* [Scanlines](./heatmap.md#heatmap-scanlines-heatmapscanlines)
* [Sparse](./heatmap.md#heatmap-sparse-heatmapsparse)

## Dimensional Set Based Kinds

Expand Down
37 changes: 16 additions & 21 deletions data/contract_docs/heatmap.md
@@ -1,10 +1,8 @@
# Heatmap
# Heatmap

Status: EARLY Draft/Proposal

Heatmaps are used to show the magnitude of a phenomenon as color in two dimensions. The variation in color
may give visual cues about how the phenomenon is clustered or varies over space.

Heatmaps are used to show the magnitude of a phenomenon as color in two dimensions. The variation in color may give visual cues about how the phenomenon is clustered or varies over space.

## Heatmap buckets (HeatmapBuckets)

Expand Down Expand Up @@ -51,30 +49,28 @@ Example:
</td>
</tr>
<tr>
<td>1653416391000</td>
<td>2022-05-24 18:19:51</td>
<td>6</td>
<td>7</td>
<td>8</td>
</tr>
<tr>
<td>1653416391000</td>
<td>2022-05-24 18:19:51</td>
<td>6</td>
<td>7</td>
<td>8</td>
</tr>
<tr>
<td>1653416391000</td>
<td>2022-05-24 18:19:51</td>
<td>6</td>
<td>7</td>
<td>8</td>
</tr>
</table>


Note: [Timeseries wide](./timeseries.md#time-series-wide-format-timeserieswide) can be used directly
as heatmap-buckets, in this case each value field becomes a row in the heatmap.


## Heatmap scanlines (HeatmapScanlines)

In this format, each row in the frame indicates the value of a single cell in a heatmap.
Expand Down Expand Up @@ -116,43 +112,43 @@ There exists a row for every cell in the heatmap.
</td>
</tr>
<tr>
<td>1653416391000</td>
<td>2022-05-24 18:19:51</td>
<td>100</td>
<td>1</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>1653416391000</td>
<td>2022-05-24 18:19:51</td>
<td>200</td>
<td>2</td>
<td>2</td>
<td>2</td>
</tr>
<tr>
<td>1653416391000</td>
<td>2022-05-24 18:19:51</td>
<td>300</td>
<td>3</td>
<td>3</td>
<td>3</td>
</tr>

<tr>
<td>1653416392000</td>
<td>2022-05-24 18:19:52</td>
<td>100</td>
<td>4</td>
<td>4</td>
<td>4</td>
</tr>
<tr>
<td>1653416392000</td>
<td>2022-05-24 18:19:52</td>
<td>200</td>
<td>5</td>
<td>5</td>
<td>5</td>
</tr>
<tr>
<td>1653416392000</td>
<td>2022-05-24 18:19:52</td>
<td>300</td>
<td>6</td>
<td>6</td>
Expand All @@ -166,19 +162,18 @@ Note that multiple "value" fields can included to represent multiple dimensions
The first value field is used in the display, unless explicilty configured

The field names for yMax|yMin|y indicate the aggregation period or the supplied values.

* yMax: the values are from the bucket below
* yMin: the values are from to bucket above
* y: the values are in the middle of the bucket


## Heatmap sparse (HeatmapSparse)

This format is simplar to Heatmap scanlines, except that each cell is independent from its adjacent values.
Unlike scanlines, this allows resolutions to change over time. Where scanline has uniformity of cells over time, heatmap sparse allows for variability of cells along the x axis(Time).

Example:


<table>
<tr>
<td>
Expand Down Expand Up @@ -213,15 +208,15 @@ Example:
</td>
</tr>
<tr>
<td>1653416391000</td>
<td>1653416392000</td>
<td>2022-05-24 18:19:51</td>
<td>2022-05-24 18:19:52</td>
<td>100</td>
<td>200</td>
<td>1</td>
</tr>
<tr>
<td>1653416392000</td>
<td>1653416393000</td>
<td>2022-05-24 18:19:52</td>
<td>2022-05-24 18:19:53</td>
<td>200</td>
<td>400</td>
<td>2</td>
Expand Down

0 comments on commit 0384666

Please sign in to comment.