DataBrighten

    Coal rents (% of GDP)

    8,343 × 6rows × columns: 200 countries, 1970 to 2021

    Real data: World Bank, World Development Indicators, indicator NY.GDP.COAL.RT.ZS, retrieved 19 November 2026. Values are as published; we only reshaped the file.

    textnumberdateyes/no
    Rows8,343country-year values
    Countries200with at least one value
    Years1970 – 202152 years with data
    LicenceCC BY 4.0credit the World Bank

    What it measures

    Coal rents are the difference between the value of both hard and soft coal production at world prices and their total costs of production.

    The numbers in 2021

    In 2021, 188 countries have a value. The highest is Cabo Verde (17.18); at the bottom, 122 countries tie at 0 (e.g. Algeria, American Samoa, Angola). The median country value is 0. The World Bank's World aggregate for 2021 is 0.26.

    Top 10 countries, 2021

    % of GDP

    Source: World Bank, NY.GDP.COAL.RT.ZS, retrieved 19 November 2026. Computed from coal-rents-percent-of-gdp.csv.

    Highest, 2021

    #CountryValue
    1Cabo Verde17.18
    2Mongolia4.89
    3Mozambique3.78
    4South Africa2.44
    5India1.28
    6Indonesia1.22
    7Kazakhstan0.849
    8Australia0.786
    9Colombia0.726
    10Mauritania0.67

    Lowest, 2021

    Ties are listed A to Z.

    #CountryValue
    1West Bank and Gaza0
    2Vanuatu0
    3Uruguay0
    4United Arab Emirates0
    5Uganda0
    6Turks and Caicos Islands0
    7Tunisia0
    8Trinidad and Tobago0
    9Tonga0
    10Togo0
    How many countries report, by decade
    DecadeMost countries in one year
    1970s93
    1980s153
    1990s185
    2000s196
    2010s197
    2020s193

    World aggregate by year

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

    YearWorld
    20210.26
    20200.144
    20190.183
    20180.244
    20170.216
    20160.164
    20150.159
    20140.238
    20130.297
    20120.429
    20110.735
    20100.556

    By region, 2021

    World Bank regionValue
    South Asia1.09
    Sub-Saharan Africa 0.544
    East Asia & Pacific0.452
    North America0.158
    Europe & Central Asia0.0675
    Latin America & Caribbean 0.0533
    Middle East, North Africa, Afghanistan & Pakistan0.0113

    First rows

    coal-rents-percent-of-gdp.csv

    countrytextiso3textregiontextincome_grouptextyearnumbervaluenumber
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income19800.0515118681579856
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income19810.0870233499866114
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income20020.00465001997676017
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income20030.00747274848408489
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income20040.0165437838421436
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income20050.0109135244434021
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income20060.0112063527032708
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income20070.0770462649096367

    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
    valuenumberCoal rents (% of GDP), 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 2021?

    Cabo Verde, with 17.18.

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

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

    SQL (table wb = the CSV)

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

    pandas (df = pd.read_csv("coal-rents-percent-of-gdp.csv"))

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

    File: coal-rents-percent-of-gdp.csv

    How many countries report a value for 2021?

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

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

    =COUNTIF(E2:E100000,2021)

    SQL (table wb = the CSV)

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

    pandas (df = pd.read_csv("coal-rents-percent-of-gdp.csv"))

    (df.year == 2021).sum()

    File: coal-rents-percent-of-gdp.csv

    What is the median across countries in 2021?

    0 (median of the 188 country values; not a World Bank aggregate).

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

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

    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 = 2021 ORDER BY value
      LIMIT 2 - (SELECT COUNT(*) FROM wb WHERE year = 2021) % 2
      OFFSET (SELECT (COUNT(*) - 1) / 2 FROM wb WHERE year = 2021));

    pandas (df = pd.read_csv("coal-rents-percent-of-gdp.csv"))

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

    File: coal-rents-percent-of-gdp.csv

    Which country rose the most between 2011 and 2021?

    Mozambique: from 1.6 to 3.78, a rise of 2.18 (out of 186 countries with both years).

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

    Use the wide file (coal-rents-percent-of-gdp-wide.csv): add a column = [2021] - [2011], 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 = 2011 AND b.year = 2021 ORDER BY rise DESC LIMIT 1;

    pandas (df = pd.read_csv("coal-rents-percent-of-gdp.csv"))

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

    File: coal-rents-percent-of-gdp.csv

    Which year has the most countries reporting?

    2012, with 197 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("coal-rents-percent-of-gdp.csv"))

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

    File: coal-rents-percent-of-gdp.csv