Datasets are the core data containers in PrintHeritage. Each project stores an array of datasets in itsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/joaomonteir0/printheritage/llms.txt
Use this file to discover all available pages before exploring further.
datasets JSONB column, where every entry represents one physical or virtual sensor feed — a temperature logger, a humidity probe, an accelerometer. Within a dataset, readings arrive as a flat array of timestamped rows, and a metadata object captures how those readings should be displayed in the visualisation dashboard.
Dataset Structure
A single entry in thedatasets array has four top-level keys:
| Key | Type | Description |
|---|---|---|
id | string (UUID) | Server-assigned unique identifier. Returned by PATCH /projects/{id}/data. |
label | string | Human-readable name for the sensor feed, e.g. "Interior Temperature". |
data | array | Ordered array of reading objects (see Reading structure below). |
metadata | object | Display and sensor configuration (see Metadata fields below). |
Reading Structure
Each element of thedata array is a flat JSON object. It must contain a date key with an ISO 8601 timestamp and one or more numeric columns whose names match the keys listed in metadata.selectedColumns:
Metadata Fields
| Key | Type | Description |
|---|---|---|
unit | string | Physical unit label shown on the chart axis, e.g. "°C", "%RH", "mm/s²". |
sensorType | string | Sensor category. One of Temperatura, Humidade, or Vibração. |
defaultChartType | string | Chart type used by default. One of Linha, Área, Barras, or Scatter. |
supportedChartTypes | array | List of chart types the user can switch to in the dashboard. |
selectedColumns | array | Column names from the uploaded file that should be plotted. |
Full Dataset Example
Supported Sensor Types
PrintHeritage currently recognises three sensor categories. ThesensorType value in metadata is used to group sensors in the UI and apply type-specific validation during the configuration wizard.
Temperatura
Measures ambient or surface temperature. Typical unit:
°C or °F.Humidade
Measures relative humidity. Typical unit:
%RH.Vibração
Measures structural vibration or acceleration. Typical unit:
mm/s² or g.Supported Chart Types
| Value | Rendered as | Best for |
|---|---|---|
Linha | Line chart | Continuous time-series with clear trends |
Área | Area chart | Emphasising volume or cumulative change |
Barras | Bar chart | Discrete interval comparisons |
Scatter | Scatter plot | Correlation analysis or sparse readings |
defaultChartType is applied when a dataset is first opened. Users can switch between any type listed in supportedChartTypes without changing the underlying data.
Creating a New Sensor (Configuration Wizard)
The NewSensorModal guides you through a three-step wizard before any data is uploaded. Completing it writes a new entry to the project’sdatasets array with an empty data field ready to receive readings.
Name and description
Enter a
label for the sensor feed (e.g. "East Façade Temperature") and an optional free-text description. The label must be unique within the project — submitting a duplicate label updates the existing dataset instead of creating a new one.Sensor type and unit
Select the
sensorType from the three available categories (Temperatura, Humidade, Vibração) and type the physical unit string that will appear on chart axes. The unit is free-form, so you can enter anything appropriate for your instrumentation.Adding Data to a Dataset
After a sensor is configured, use the AddDataResourceModal to load actual readings. Three source types are supported:CSV
Upload a
.csv file. The file must include a column named date or data as the timestamp column, plus at least one numeric value column. Column headers become available for selection in selectedColumns.XLSX
Upload a
.xlsx spreadsheet with the same column structure as CSV. The first sheet is read. Headers in the first row follow the same date/data naming requirement.API Endpoint
Provide an external HTTP endpoint URL. PrintHeritage polls the URL on a configurable interval (timeout in seconds). The response must return JSON in the same row-object format as the
data array.CSV and XLSX Format Requirements
A valid CSV looks like this:metadata.selectedColumns. Only selected columns are rendered in charts — the raw data for unselected columns is still preserved in data and can be surfaced later by updating selectedColumns.