DataBrighten

    People using safely managed sanitation services, urban (% of urban population)

    3,067 × 6rows × columns: 124 countries, 2000 to 2024

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

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

    What it measures

    The percentage of people using improved sanitation facilities that are not shared with other households and where excreta are safely disposed of in situ or transported and treated offsite. Improved sanitation facilities include flush/pour flush to piped sewer systems, septic tanks or pit latrines: ventilated improved pit latrines, composting toilets or pit latrines with slabs.

    Limits and exceptions (World Bank note)

    There are three main ways to meet the criteria for having a safely managed sanitation service (People should use improved sanitation facilities that are not shared with other households, and the excreta produced should either be: treated and disposed of in situ; stored temporarily and then emptied, transported and treated off-site, or transported through a sewer with wastewater and then treated off-site). Many countries lack information on either wastewater treatment or the management of on-site sanitation. A national estimate is produced if information is available for the dominant type of sanitation system. If no information is available, it is assumed that 50 percent is safely managed. Regional and income group estimates are made when data are available for at least 30 percent of the population.

    The numbers in 2024

    In 2024, 122 countries have a value. At the top, 3 countries tie at 100 (e.g. Andorra, Monaco, Singapore); the lowest is Armenia (0). The median country value is 53.69. The World Bank's World aggregate for 2024 is 65.83.

    Top 10 countries, 2024

    % of urban population

    Source: World Bank, SH.STA.SMSS.UR.ZS, retrieved 19 November 2026. Computed from people-using-safely-managed-sanitation-services-urban-percent-of-urban-population.csv.

    Highest, 2024

    Ties are listed A to Z.

    #CountryValue
    1Andorra100
    2Monaco100
    3Singapore100
    4Kuwait100
    5Austria99.95
    6Switzerland99.77
    7Chile99.19
    8United Kingdom98.96
    9United Arab Emirates98.44
    10Germany98.33

    Lowest, 2024

    #CountryValue
    1Armenia0
    2Colombia7.19
    3North Macedonia8.19
    4Mali9.75
    5Zimbabwe10.34
    6Togo14.97
    7Congo, Dem. Rep.15.15
    8Madagascar16.75
    9Somalia, Fed. Rep.17.35
    10Ghana17.64
    How many countries report, by decade
    DecadeMost countries in one year
    2000s123
    2010s124
    2020s124

    World aggregate by year

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

    YearWorld
    202465.83
    202365.66
    202265.39
    202164.97
    202064.55
    201964.12
    201862.95
    201761.78
    201660.6
    201559.43
    201458.25
    201357.12

    By region, 2024

    World Bank regionValue
    North America95.57
    Europe & Central Asia83.28
    East Asia & Pacific74.9
    Middle East, North Africa, Afghanistan & Pakistan63.09
    Latin America & Caribbean 52.89
    South Asia52.81
    Sub-Saharan Africa 32.19

    First rows

    people-using-safely-managed-sanitation-services-urban-percent-of-urban-population.csv

    countrytextiso3textregiontextincome_grouptextyearnumbervaluenumber
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income20009.61708631086709
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income20019.6170863108671
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200210.2940148637669
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200310.9709434166667
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200411.6478719695665
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200512.3248005224662
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200613.001729075366
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200713.7511330374672

    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 using safely managed sanitation services, urban (% of urban 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?

    There is a tie: 3 countries share the highest value, 100 (for example Andorra, Monaco, Singapore).

    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-using-safely-managed-sanitation-services-urban-percent-of-urban-population.csv"))

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

    File: people-using-safely-managed-sanitation-services-urban-percent-of-urban-population.csv

    How many countries report a value for 2024?

    122 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-using-safely-managed-sanitation-services-urban-percent-of-urban-population.csv"))

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

    File: people-using-safely-managed-sanitation-services-urban-percent-of-urban-population.csv

    What is the median across countries in 2024?

    53.69 (median of the 122 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-using-safely-managed-sanitation-services-urban-percent-of-urban-population.csv"))

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

    File: people-using-safely-managed-sanitation-services-urban-percent-of-urban-population.csv

    Which country rose the most between 2014 and 2024?

    Georgia: from 6.25 to 71.08, a rise of 64.84 (out of 121 countries with both years).

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

    Use the wide file (people-using-safely-managed-sanitation-services-urban-percent-of-urban-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-using-safely-managed-sanitation-services-urban-percent-of-urban-population.csv"))

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

    File: people-using-safely-managed-sanitation-services-urban-percent-of-urban-population.csv

    Which year has the most countries reporting?

    2021, with 124 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-using-safely-managed-sanitation-services-urban-percent-of-urban-population.csv"))

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

    File: people-using-safely-managed-sanitation-services-urban-percent-of-urban-population.csv