Metadata

This page describes how to search for data in the API. All examples below expects you to have an initialized instance of the client called eq.

Operations described here are available under eq.metadata.*.

Look up a curve name

Method reference: eq.metadata.curve()

When you know the name of a curve and want to load the corresponding Curve instance, use the eq.metadata.curve() method:

>>> curve = eq.metadata.curve("CZ>DE Exchange Net Transfer Capacity MW 15min REMIT")
>>> curve
<Curve: "CZ>DE Exchange Net Transfer Capacity MW 15min REMIT", curve_type=TIMESERIES, subscription=FREEMIUM>

When you provide a name that does not exist, this method will throw a NotFoundError. Below we try to load an actual nuclear production curve for Norway. However, Norway does not have nuclear production, so the curve does not exist:

>>> curve = eq.metadata.curve("NO Nuclear Production MWh/h Actual")
...
NotFoundError: Curve 'NO Nuclear Production MWh/h Actual' not found

Places

Method reference: eq.metadata.places()

Similar to the curve search, you can look up places with a free-text search:

>>> nuclear_powerplants = eq.metadata.places(q='nuclear germany')
>>> nuclear_powerplants
[<Place: key="pp-brokdorf", name="Brokdorf", kind=PRODUCER, fuels=['Nuclear'], location=[53.851095, 9.345944]>,
 <Place: key="pp-emsland", name="Emsland", kind=PRODUCER, fuels=['Nuclear'], location=[52.481878, 7.306658]>,
 <Place: key="pp-grohnde", name="Grohnde", kind=PRODUCER, fuels=['Nuclear'], location=[52.035641, 9.413497]>,
 ...

You can also filter by attributes:

>>> eq.metadata.places(area=Area.DE, fuel='nuclear')
[<Place: key="pp-brokdorf", name="Brokdorf", kind=PRODUCER, fuels=['Nuclear'], location=[53.851095, 9.345944]>,
 <Place: key="pp-emsland", name="Emsland", kind=PRODUCER, fuels=['Nuclear'], location=[52.481878, 7.306658]>,
 <Place: key="pp-grohnde", name="Grohnde", kind=PRODUCER, fuels=['Nuclear'], location=[52.035641, 9.413497]>,
 ...

Places are not very useful by themselves, but they have a list of all referenced curves. Here you can see the actual production curve and the REMIT capacity curve for the German nuclear powerplant Brokdorf:

>>> brokdorf = nuclear_powerplants[0]
>>> brokdorf.curves
[<Curve: "DE @Brokdorf Nuclear Capacity Available MW REMIT", curve_type=INSTANCE_PERIOD, subscription=FREEMIUM>,
 <Curve: "DE @Brokdorf Nuclear Production MWh/h H Actual", curve_type=TIMESERIES, subscription=FREEMIUM>]

See energyquantified.api.MetadataAPI.places for a full reference.

Categories

Method references: eq.metadata.categories() and eq.metadata.exact_categories()

Curve names are, among other attributes, built by combining categories. You can list categories by using the categories()-method. It will return a set of all available categories:

>>> eq.metadata.categories()
{'API-2',
 'Auction',
 'Available',
 'Base',
 'Bioenergy',
 'Biogas',
 'Biomass',
 'Brent',
 ...

Since curve names are the combination of these categories (such as Spot Price, Wind Power Production etc.), there is also an operation for listing all combinations of categories. Use the exact_categories()-method to list these:

>>> eq.metadata.exact_categories()
{'Bioenergy Power Production',
 'Biogas Power Production',
 'Biomass Power Capacity Available',
 'Biomass Power Production',
 'CHP District-heating Power Production',
 'CHP Industry Power Production',
 'CHP Power Production',
 'Consumption',
 'Consumption Capacity Available',
 'Consumption Holiday-Reduction',
 'Consumption Index Chilling',
 'Consumption Index Cloudiness',
 ...

As with other metadata, the responses are cached.


Next steps

Learn how to load time series, time series instances, period-based series, and period-based series instances.