Concepts
Pipeline
The big-picture flow from state to data to display
The measurements package is a headless toolkit for building energy measurement experiences. It does not render charts or own your app architecture. Instead, it provides small pieces that compose into a predictable data flow.
The core idea
A measurement view usually needs to answer four questions:
- What range should we show? Timeframe state resolves the selected date, period, timezone, and request bounds.
- Which meters are involved? Market supply points describe the supply points and utilities available for a property.
- What data do we have? Fetching returns normalized measurement records for the resolved range and supply points.
- How should it be shown? Preferences and transforms turn records into chart, table, or summary data.
These concerns stay separate. Changing the timeframe changes what is fetched. Changing preferences usually changes only how existing records are transformed.
Feature layers
The package includes data transforms for the following features:
| Feature | Purpose |
|---|---|
| EnergyOverview | turns records into chart-ready overview data |
| EnergySummary | turns records into week comparison data |
Where to go next
- Data model: the vocabulary used throughout the package
- Time and availability: why initial dates need care
- Fetching: how data enters the pipeline
- State and storage: how timeframe and preferences are owned or persisted