DataBrighten

    Electricity production from oil, gas and coal sources (% of total)

    6,446 × 6rows × columns: 209 countries, 1990 to 2025

    Real data: World Bank, World Development Indicators, indicator EG.ELC.FOSL.ZS, retrieved 19 November 2026. Values are as published; we only reshaped the file.

    textnumberdateyes/no
    Rows6,446country-year values
    Countries209with at least one value
    Years1990 – 202536 years with data
    LicenceCC BY 4.0credit the World Bank

    What it measures

    The share of electricity production from oil, gas and coal sources of total electricity production. Sources of electricity refer to the inputs used to generate electricity. Oil refers to crude oil and petroleum products. Gas refers to natural gas but excludes natural gas liquids. Coal refers to all coal and brown coal, both primary (including hard coal and lignite-brown coal) and derived fuels (including patent fuel, coke oven coke, gas coke, coke oven gas, and blast furnace gas). Peat is also included in this category.

    The numbers in 2024

    In 2024, 147 countries have a value. The highest is Turkmenistan (100); the lowest is Ethiopia (0.00677). The median country value is 55.67. The World Bank's World aggregate for 2023 is 48.67.

    Top 10 countries, 2024

    % of total

    Source: World Bank, EG.ELC.FOSL.ZS, retrieved 19 November 2026. Computed from electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv.

    Highest, 2024

    #CountryValue
    1Turkmenistan100
    2Libya99.98
    3Trinidad and Tobago99.91
    4Brunei Darussalam99.9
    5Kuwait99.8
    6Bahrain99.68
    7Gibraltar99.58
    8Algeria99.25
    9Botswana99.09
    10Hong Kong SAR, China98.72

    Lowest, 2024

    #CountryValue
    1Ethiopia0.00677
    2Paraguay0.00937
    3Iceland0.0153
    4Switzerland0.31
    5Sweden0.506
    6Uruguay0.932
    7Norway1.03
    8Congo, Dem. Rep.1.13
    9Namibia1.85
    10Luxembourg2.37
    How many countries report, by decade
    DecadeMost countries in one year
    1990s144
    2000s206
    2010s207
    2020s207

    World aggregate by year

    As published by the World Bank (in the regions file, not the country file).

    YearWorld
    202348.67
    202260.72
    202161.49
    202061.43
    201962.9
    201864.07
    201764.68
    201665.3
    201566.14
    201466.65
    201367.12
    201267.7

    First rows

    electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv

    countrytextiso3textregiontextincome_grouptextyearnumbervaluenumber
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income20006.46268229911353
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income20016.46268229911353
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income20026.46255029718744
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200319.3691395598403
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200437.1350640094301
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200536.9860208594987
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200629.1044054614401
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200730.9694157561243

    Data dictionary

    ColumnTypeMeaning
    countrytextCountry or economy, World Bank name
    iso3textISO 3166-1 alpha-3 code
    regiontextWorld Bank region
    income_grouptextWorld Bank income group
    yearnumberCalendar year of the value
    valuenumberElectricity production from oil, gas and coal sources (% of total), exactly as the World Bank API returns it (not rounded)

    Only country-years with a value are in the long file; blank cells in the wide file mean no value was published.

    Practice questions

    answers computed from the file

    Which country has the highest value in 2024?

    Turkmenistan, with 100.

    Excel (on the long CSV: E = year, F = value)

    =FILTER(A2:A100000,(E2:E100000=2024)*(F2:F100000=MAXIFS(F2:F100000,E2:E100000,2024)))

    SQL (table wb = the CSV)

    SELECT country, value FROM wb WHERE year = 2024
      AND value = (SELECT MAX(value) FROM wb WHERE year = 2024);

    pandas (df = pd.read_csv("electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv"))

    y = df[df.year == 2024]
    y[y.value == y.value.max()][["country", "value"]]

    File: electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv

    How many countries report a value for 2024?

    147 of the 217 economies in the file's country list.

    Excel (on the long CSV: E = year, F = value)

    =COUNTIF(E2:E100000,2024)

    SQL (table wb = the CSV)

    SELECT COUNT(*) FROM wb WHERE year = 2024;

    pandas (df = pd.read_csv("electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv"))

    (df.year == 2024).sum()

    File: electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv

    What is the median across countries in 2024?

    55.67 (median of the 147 country values; not a World Bank aggregate).

    Excel (on the long CSV: E = year, F = value)

    =MEDIAN(FILTER(F2:F100000,E2:E100000=2024))

    SQL (table wb = the CSV)

    -- SQLite has no MEDIAN(); this picks the middle value(s)
    SELECT AVG(value) FROM (SELECT value FROM wb WHERE year = 2024 ORDER BY value
      LIMIT 2 - (SELECT COUNT(*) FROM wb WHERE year = 2024) % 2
      OFFSET (SELECT (COUNT(*) - 1) / 2 FROM wb WHERE year = 2024));

    pandas (df = pd.read_csv("electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv"))

    df[df.year == 2024]["value"].median()

    File: electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv

    Which country rose the most between 2014 and 2024?

    Togo: from 42.03 to 80.36, a rise of 38.33 (out of 144 countries with both years).

    Excel (on the long CSV: E = year, F = value)

    Use the wide file (electricity-production-from-oil-gas-and-coal-sources-percent-of-total-wide.csv): add a column = [2024] - [2014], then sort it largest to smallest.

    SQL (table wb = the CSV)

    SELECT a.country, b.value - a.value AS rise FROM wb a JOIN wb b ON a.iso3 = b.iso3
    WHERE a.year = 2014 AND b.year = 2024 ORDER BY rise DESC LIMIT 1;

    pandas (df = pd.read_csv("electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv"))

    w = df.pivot(index="country", columns="year", values="value")
    (w[2024] - w[2014]).dropna().nlargest(1)

    File: electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv

    Which year has the most countries reporting?

    2021, with 207 countries. (Later years are still filling in as countries report.)

    Excel (on the long CSV: E = year, F = value)

    Make a pivot table: year in Rows, Count of value in Values, then sort by the count.

    SQL (table wb = the CSV)

    SELECT year, COUNT(*) AS n FROM wb GROUP BY year ORDER BY n DESC, year DESC LIMIT 1;

    pandas (df = pd.read_csv("electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv"))

    df.groupby("year").size().sort_values(ascending=False).head(1)

    File: electricity-production-from-oil-gas-and-coal-sources-percent-of-total.csv