Selecting a Data Source
The Carbon Aware SDK includes access to various data sources of carbon aware data, including WattTime, ElectricityMaps, and a custom JSON source. These matrices are an attempt to track what features of the Carbon Aware SDK are enabled for which data sources.
Contents
Type of Data Sources and Configuration
In the CarbonAware SDK configuration, you can set what data source to use as the
EmissionsDataSource
and the ForecastDataSource
. There are also certain
configuration fields that must be set in order to access the raw data.
Type | WattTime | ElectricityMaps | JSON |
---|---|---|---|
Is Emissions DataSource | ✅ | ✅ | ✅ |
Is Forecast DataSource | ✅ | ✅ | ❌ |
Makes HTTP(s) call | ✅ | ✅ | ❌ |
Can Use Custom Data | ❌ | ❌ | ✅ |
Supports Trial + Full Account | ✅ | ✅ | N/A |
Data Source Methods Available
Not all data sources support all the routes provided in the interfaces
(IEmissionsDataSource
/IForecastDataSource
).
Methods | WattTime | ElectricityMaps | JSON | CLI Usage | Web Api Usage | SDK Usage |
---|---|---|---|---|---|---|
GetCarbonIntensityAsync | ✅ | ✅ | ✅ | emissions | emissions/bylocation or emissions/bylocations or emissions/bylocations/best or emissions/average ‑carbon ‑intensity or emissions/average ‑carbon ‑intensity/batch | GetEmissionsDataAsync(...) or GetBestEmissionsDataAsync(...) or GetAverageCarbonIntensityDataAsync(...) |
GetCurrentForecastAsync | ✅ | ✅ | ❌ | emissions ‑forecasts | forecasts/current | GetCurrentForecastAsync(...) |
GetForecastByDateAsync | ✅ | ❌ | ❌ | emissions ‑forecasts ‑‑requested ‑at | forecasts/batch with requestedAt field | GetForecastByDateAsync(...) |
Location Coverage
Different data sources provide both different features (as outlined above) but also coverage of different geographic areas. It's important to note that each data source may have different region names, which are handled through the location config.
- For
WattTime
, see their interactive coverage map to find the relevant zone. - For
ElectricityMaps
, see their live map app to find the relevant zone and see current data coming in or their zone list endpoint to find the relevant zones.