IndicatorsManager provides access to electricity market indicators with intelligent caching, automatic chunking, and multi-geography support.
IndicatorsManager
Access viaclient.indicators.
list()
List all available indicators as a DataFrame.pd.DataFrame with columns:
id(index)name— Full indicator nameshort_name— Abbreviated namedescription— HTML-stripped description- Additional metadata fields
catalog_ttl_hours).
search(query)
Search indicators by name using case-insensitive substring matching.Search term to match against indicator names
pd.DataFrame with matching indicators.
get(indicator_id)
Get a specific indicator by ID and return a handle for data retrieval.Unique indicator identifier
IndicatorHandle instance with metadata and data retrieval methods.
Caching: Uses cached metadata when fresh (within meta_ttl_days).
compare(indicator_ids, start, end, **kwargs)
Fetch multiple indicators and merge into a single DataFrame with aligned timestamps.List of indicator IDs to compare
Start date (YYYY-MM-DD format)
End date (YYYY-MM-DD format)
Filter to specific geography IDs
Response language (
"es" or "en")Time aggregation function (
"SUM", "AVG", etc.)Geography aggregation function
Time truncation level (
"hour", "day", etc.)Geography truncation level
pd.DataFrame with DatetimeIndex and columns:
- Single-geo indicators: Flat columns named by indicator name
- Multi-geo indicators: MultiIndex columns
(indicator_name, geo_name)
IndicatorHandle
Returned byIndicatorsManager.get(). Provides metadata access and historical data retrieval for a specific indicator.
Attributes
Indicator ID
Indicator name
Raw API metadata including
geos, description, etc.Parsed indicator model
geos
Available geographies for this indicator.list[dict[str, Any]] with geo_id and geo_name keys.
geos_dataframe()
Get available geographies as a DataFrame.pd.DataFrame with columns geo_id and geo_name.
resolve_geo(ref)
Resolve a geography reference (ID or name) to a numericgeo_id.
Geography reference:
- Integer
geo_id(returned as-is) - String integer (parsed)
- Geography name (case-insensitive substring match)
int — The resolved geo_id.
Raises: ValueError if name doesn’t match any known geography.
historical(start, end, **kwargs)
Fetch historical values as a DataFrame with timezone-aware DatetimeIndex.Start date (YYYY-MM-DD format)
End date (YYYY-MM-DD format)
Filter to specific geography IDs
Response language (
"es" or "en")Time aggregation:
"SUM", "AVG", "MAX", "MIN"Geography aggregation function
Time truncation:
"hour", "day", "month", "year"Geography truncation level
pd.DataFrame with:
- DatetimeIndex (timezone-aware, Europe/Madrid)
- Single geography: Column named by indicator ID
- Multiple geographies: Columns named by
geo_name
- Automatically chunks requests exceeding ~3 weeks
- Uses local parquet cache when enabled
- Only fetches missing date ranges from API
- Enriches geography metadata from response values
time_agg or geo_agg disables caching.
