---
source: https://carbone.io/examples/sensor-readings/
title: "Industrial Temperature Report | Carbone Sample"
description: "Learn how to create professional temperature monitoring reports using Carbone. Transform your sensor data into beautiful Word documents with dynamic coloring and data visualization."
generated_at: "2026-07-13"
---

# Sensor readings

Create stunning reports for your industrial temperature sensors

[![sensor-readings thumbnail](/examples/sensor-readings/thumb-result.webp)](/examples/sensor-readings/result.pdf)

[Download Template](/examples/sensor-readings/template.docx)

[Download data sample](/examples/sensor-readings/data.json)

-   Template type document docx simple
-   Carbone min. v4.24.0+
-   Features bidirectional-loop color aggregator
-   Target datasheet audit monitoring industry tests reports

## Overview

Learn how to generate professional temperature monitoring reports that include:

-   Time-based sensor measurements using horizontal data loops
-   Location-based sensor measurements using vertical data loops
-   Dynamic cell coloring based on temperature values

## Step-by-Step Guide

### 1\. Define Temperature Scale and Colors

First, create a legend table that shows temperature ranges and their corresponding colors. This will serve as a visual guide for interpreting the data.

### 2\. Structure Your Data Table

Create a table to display your temperature data:

a. Insert values using [Carbone tags](/documentation/design/substitutions/the-basics.md)

b. Set up the vertical loop for different locations:

-   Use tags like `{d.town[i].name}` for current row
-   Use `{d.town[i+1]}` for next row

c. Configure the horizontal loop for time-based data:

-   Header row: `{d.town[0].data[i].month}` and `{d.town[0].data[i+1].month}`
-   Data rows: `{d.town[i].data[i].month}` and `{d.town[i].data[i+1].month}`

Note: While vertical loops need only one `[i+1]`, horizontal loops require repeating `[i+1]` for each iteration.

### 3\. Implement Dynamic Cell Coloring

Add color logic to your cells using Carbone's formatting features:

1.  Use these formatters:
    -   [:ifGTE and :ifLT](/documentation/design/conditions/overview.md) for value comparison
    -   [:show()](/documentation/design/conditions/inline-conditions.md#show-text-elseshow-text) for color selection
    -   [:color](/documentation/design/advanced-features/colors.md#color-scope-type) for applying background colors

Example of a basic color condition:

```text
{d.town[i].data[i].temperature:ifGTE(-15):and:ifLT(-10):show(#0661FF):color(cell,background)}
```

2.  Use the [:or()](/documentation/design/conditions/overview.md#or-value) formatter as many times as needed to define the color for each level of the previously defined scale:

```text
{d.town[i].data[i].temperature
  :ifGTE(-15):and:ifLT(-10):show(#0661FF)
  :or(.temperature):ifGTE(-10):and:ifLT(-5):show(#0395FF)
  :or(.temperature):ifGTE(-5):and:ifLT(0):show(#03CBFF)
  :or(.temperature):ifGTE(0):and:ifLT(5):show(#00FEFD)
  :or(.temperature):ifGTE(5):and:ifLT(10):show(#B3FFFD)
  :or(.temperature):ifGTE(10):and:ifLT(15):show(#FBFD35)
  :or(.temperature):ifGTE(15):and:ifLT(20):show(#FFD800)
  :or(.temperature):ifGTE(20):and:ifLT(25):show(#FFB201)
  :or(.temperature):ifGTE(25):and:ifLT(30):show(#FC9203)
  :or(.temperature):ifGTE(30):show(#FF5F03)
  :color(cell,background)
}
```

### 4\. Calculate Averages

Compute average temperatures using these formatters:

-   Use `[]` to select the entire data array
-   [:aggAvg](/documentation/design/computation/aggregation.md#aggavg-partitionby) for average calculation
-   [:round()](/documentation/design/formatters/number.md#round-precision) for decimal precision

Example:

```text
{d.town[i].data[].temperature:aggAvg:round(2)}
```

## Related Examples

[![real-estate-property-description thumbnail example](/examples/real-estate-property-description/thumb-result.webp)](/examples/real-estate-property-description/index.md)

## Trusted by 800+ paid customers in 40+ countries

## Related topics

- [Transport ticket](/examples/ticket/index.md)
- [Summary](/examples/summary/index.md)
- [Stock inventory spreadsheet](/examples/stock-inventory-spreadsheet/index.md)
- [Store Inventory](/examples/shoes/index.md)
- [Real estate property document](/examples/real-estate-property-description/index.md)
- [Automation of Quotes](/examples/quote-with-datasheet/index.md)
