Renewable Energy
Renewable energy is defined as the contribution of renewables to total primary energy supply (TPES). Renewables include the primary energy equivalent of hydro (excluding pumped storage), geothermal, solar, wind, tide and wave sources.
Energy derived from solid biofuels, biogasoline, biodiesels, other liquid biofuels, biogases and the renewable fraction of municipal waste are also included. Biofuels are defined as fuels derived directly or indirectly from biomass (material obtained from living or recently living organisms).
This includes wood, vegetal waste (including wood waste and crops used for energy production), ethanol, animal materials/wastes and sulphite lyes. Municipal waste comprises wastes produced by the residential, commercial and public service sectors that are collected by local authorities for disposal in a central location for the production of heat and/or power.
This indicator is the renewable share of total primary energy supply, returned as an annual decimal fraction (0.0872 for 8.72%).
See definition: https://data.oecd.org/energy/renewable-energy.htm
Also known as: clean energy, green energy, renewable energy share.
No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Renewable Energy for you. Just ask in plain English.
Calculate the Renewable Energy in Python
The Renewable Energy is available in the Economics module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_renewable_energy as shown below.
from financetoolkit import Economics
economics = Economics(start_date='2010-01-01', end_date='2020-01-01')
economics.get_renewable_energy(countries=['Austria', 'Germany', 'United States'])
Which returns:
| Austria | Germany | United States | |
|---|---|---|---|
| 2010 | 0.2742 | 0.0933 | 0.0568 |
| 2011 | 0.2696 | 0.102 | 0.0619 |
| 2012 | 0.307 | 0.1137 | 0.0631 |
| 2013 | 0.3011 | 0.1147 | 0.0665 |
| 2014 | 0.3068 | 0.1192 | 0.0677 |
| 2015 | 0.2985 | 0.1264 | 0.0675 |
| 2016 | 0.3034 | 0.1253 | 0.0707 |
| 2017 | 0.2984 | 0.1332 | 0.074 |
| 2018 | 0.2944 | 0.1396 | 0.0764 |
| 2019 | 0.3006 | 0.1485 | 0.0776 |
| 2020 | 0.3191 | 0.1637 | 0.083 |
Parameters
get_renewable_energy accepts the following parameters:
- countries (list[str] | str | None, optional): The countries to include in the data. Defaults to None.
- rolling (int, optional): The rolling window size to use for smoothing the data (simple moving average). Defaults to None.
- trailing (int, optional): The trailing window size to use for summing the data over trailing periods (e.g. a trailing-4-quarter sum). Defaults to None.
- growth (bool, optional): Whether to return the growth data or the actual data.
- lag (int, optional): The number of periods to lag the data by.
- standardize (bool, optional): Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.
- rounding (int | None, optional): The number of decimals to round the results to. Defaults to None.
Related Environment
The Economics module page introduces the module, and the sidebar lists all of its functions.