---
title: ElectricityInsightRecord
framework: energykit
role: symbol
role_heading: Structure
path: energykit/electricityinsightrecord
---

# ElectricityInsightRecord

A structure that provides environmental impact and cost insights for electricity usage over a specific time period.

## Declaration

```swift
struct ElectricityInsightRecord<Measure> where Measure : ElectricityInsightMeasure
```

## Overview

Overview This structure provides electricity usage data categorized by environmental impact (ElectricityInsightRecord.GridCleanliness) and cost factors (ElectricityInsightRecord.TariffPeak) for analysis and optimization. The electricity usage data (dataByGridCleanliness) refers to either energy consumption or generation measurements, or amounts of time that an electrical device is operational and consuming energy. The type of electricity usage data depends on the generic type parameter (ElectricityInsightMeasure) for a given instance, which can be either: ElectricityInsightRecord<Measurement<UnitEnergy>> ElectricityInsightRecord<Duration>

## Topics

### Getting the grid data

- [ElectricityInsightRecord.GridCleanliness](energykit/electricityinsightrecord/gridcleanliness.md)
- [dataByGridCleanliness](energykit/electricityinsightrecord/databygridcleanliness.md)

### Getting the tariff peak data

- [ElectricityInsightRecord.TariffPeak](energykit/electricityinsightrecord/tariffpeak.md)
- [dataByTariffPeak](energykit/electricityinsightrecord/databytariffpeak.md)

### Getting the insight record data

- [totalRuntime](energykit/electricityinsightrecord/totalruntime.md)
- [range](energykit/electricityinsightrecord/range.md)
- [totalEnergy](energykit/electricityinsightrecord/totalenergy.md)

## See Also

### Electricity insights

- [ElectricityInsightService](energykit/electricityinsightservice.md)
- [ElectricityInsightQuery](energykit/electricityinsightquery.md)
- [ElectricityInsightMeasure](energykit/electricityinsightmeasure.md)
