DataBrighten

    People practicing open defecation, rural (% of rural population)

    4,132 × 6rows × columns: 171 countries, 2000 to 2024

    Real data: World Bank, World Development Indicators, indicator SH.STA.ODFC.RU.ZS, retrieved 19 November 2026. Values are as published; we only reshaped the file.

    textnumberdateyes/no
    Rows4,132country-year values
    Countries171with at least one value
    Years2000 – 202425 years with data
    LicenceCC BY 4.0credit the World Bank

    What it measures

    People practicing open defecation refers to the percentage of the population defecating in the open, such as in fields, forest, bushes, open bodies of water, on beaches, in other open spaces or disposed of with solid waste.

    Limits and exceptions (World Bank note)

    National, regional and income group estimates are made when data are available for at least 50 percent of the population.

    The numbers in 2024

    In 2024, 155 countries have a value. The highest is Niger (78.07); at the bottom, 67 countries tie at 0 (e.g. Albania, Algeria, Andorra). The median country value is 0.231. The World Bank's World aggregate for 2024 is 9.2.

    Top 10 countries, 2024

    % of rural population

    Source: World Bank, SH.STA.ODFC.RU.ZS, retrieved 19 November 2026. Computed from people-practicing-open-defecation-rural-percent-of-rural-population.csv.

    Highest, 2024

    #CountryValue
    1Niger78.07
    2Chad77.59
    3South Sudan75.4
    4Benin65.15
    5Solomon Islands58.89
    6Liberia57.52
    7Namibia53.52
    8Togo50.89
    9Kiribati49.75
    10Sao Tome and Principe43.22

    Lowest, 2024

    Ties are listed A to Z.

    #CountryValue
    1Viet Nam0
    2Uruguay0
    3United States0
    4United Kingdom0
    5United Arab Emirates0
    6Turkmenistan0
    7Tunisia0
    8Thailand0
    9Switzerland0
    10Sweden0
    How many countries report, by decade
    DecadeMost countries in one year
    2000s168
    2010s170
    2020s163

    World aggregate by year

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

    YearWorld
    20249.2
    202310.43
    202211.84
    202113.13
    202014.4
    201915.71
    201816.97
    201718.21
    201619.31
    201520.55
    201421.71
    201322.87

    By region, 2024

    World Bank regionValue
    Sub-Saharan Africa 23.16
    South Asia9.24
    Middle East, North Africa, Afghanistan & Pakistan8.09
    Latin America & Caribbean 3.25
    East Asia & Pacific1.66
    Europe & Central Asia0.0369
    North America0

    First rows

    people-practicing-open-defecation-rural-percent-of-rural-population.csv

    countrytextiso3textregiontextincome_grouptextyearnumbervaluenumber
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200029.1149786330241
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200129.1149786330241
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200228.5169039489078
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200327.9188292647916
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200427.3207545806754
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200526.7226798965592
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200626.1246052124429
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200725.5265305283267

    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
    valuenumberPeople practicing open defecation, rural (% of rural population), 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?

    Niger, with 78.07.

    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("people-practicing-open-defecation-rural-percent-of-rural-population.csv"))

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

    File: people-practicing-open-defecation-rural-percent-of-rural-population.csv

    How many countries report a value for 2024?

    155 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("people-practicing-open-defecation-rural-percent-of-rural-population.csv"))

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

    File: people-practicing-open-defecation-rural-percent-of-rural-population.csv

    What is the median across countries in 2024?

    0.231 (median of the 155 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("people-practicing-open-defecation-rural-percent-of-rural-population.csv"))

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

    File: people-practicing-open-defecation-rural-percent-of-rural-population.csv

    Which country rose the most between 2014 and 2024?

    Vanuatu: from 3.38 to 6.06, a rise of 2.69 (out of 153 countries with both years).

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

    Use the wide file (people-practicing-open-defecation-rural-percent-of-rural-population-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("people-practicing-open-defecation-rural-percent-of-rural-population.csv"))

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

    File: people-practicing-open-defecation-rural-percent-of-rural-population.csv

    Which year has the most countries reporting?

    2016, with 170 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("people-practicing-open-defecation-rural-percent-of-rural-population.csv"))

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

    File: people-practicing-open-defecation-rural-percent-of-rural-population.csv