A Toilet Map of India

In my previous post, I had mapped households across Uttar Pradesh, based on their ownership of basic census assets (a mobile phone upwards). I had then compared that map with one which looked at households with toilets across the state. The differences across regions in the second case were much sharper.  And as I had pointed out in that UP post, access to toilet facilities correlates highly with a range of health indicators.

So I thought I would generalise that toilet map to the whole country. Here’s the result.

Around 47% of households across India reported having a toilet in the 2011 census, up from 36% of households in 2001. As the map below shows, the regions where a majority of households have a toilet are only a few – North and North-East India, Kerala and the Western Coastal region and parts of Gujarat. In addition, coastal Andhra and Nagpur are also significant. In the rest of the country, the larger urban centres form little ‘islands’ of privilege (in this regard) as compared with the areas around them.

(Apologies but this post may take a while to load on a slow connection, and/or if you are using a tablet or phone. Click or tap on the map to switch between 2001 and 2011. Hover your mouse over a tehsil to see its details. The greyed-out regions are those for whom data couldn’t be compiled, or those which are not relevant e.g. PoK)

Notes :

The map is based on the 2001 tehsil boundaries so I had to map the 2011 data to those boundaries. For the mapping I used the extremely helpful tables here. Your browser may throw up a security warning, but I think that’s because the gov.in domain managers haven’t renewed their site security certificate. But you proceed at your own risk.

The mapping across the census years is imperfect since I only did it with the data available at the sub-district level. Real accuracy would require mapping at the village level and then aggregating upwards but that’s really difficult and time-consuming.

For the map, I converted the shapefiles which come with the DevInfo software into SVG format for easier handling.

The toilets data is from the Census 2001 and Census 2011 tables.

Maps coloured using the d3 library, and the colours are from colorbrewer.

September 9, 2013

13 responses to A Toilet Map of India

  1. Sankara Pillai said:

    Wonderful work! Congratulations.

  2. Pingback: A Toilet Map of India – by datastories.in | On the Toilet Trail

  3. jaycdpswarup said:

    Most of the people in india live near by huge farms. And those who deficate in farms do not really need a toilet. The problem is in city where people deficate and drink the same water in mass such as mumbai and kerala

  4. Vivek said:

    One blogpost on creating these awesome maps please ? Step by step :). Many thanks.

    • Administrator said:

      Sure. Its actually been at the back of my mind for some time to do this and put up the code as well but my day job intrudes! Broadly what I do is as follows :
      1. Have a plain map in svg format
      2. use a v basic python script to bind the data we want to represent, to the svg map. So each line in the svg which relates to a specific area or tehsil or whatever, is bound to the data (e.g. percentage of toilets for that area) using the python script. the fact that an svg is essentially an xml document is v useful…
      3. use javascript to load the map and colour it, based on the data, and add the tooltips etc. The code uses the D3 library.

      so there are two scripts involved here – the python one, to bind the data to the svg, and the javascript to do the stuff which you actually see (colouring, tooltips etc). If you hit ‘view source’ you’ll be able to see the JS code involved. the python script, as i said, is a fairly basic one so anyone with a passing knowledge of the language should be able to figure it out. Anyway, I will put up both scripts as and when i find the time.

      The caveat here is I have no formal comp sci training whatsoever (well that’s technically not true – i did learn BASIC in school 😉 ). So the code you see would probably horrify anyone with actual coding skills worth the name. Am sure those with better familiarity with either Python or JS will be able to write far more efficient, leaner and faster code.

      What are the options if you don’t/can’t code? I havent found a resource (atleast one thats free) which allows you to create dynamic, interactive maps, but indiemapper.com is an excellent tool to create static, coloured svg / jpg maps as long as you have the original vector file with the data handy…really worth checking out

  5. Thomas George said:

    It is a big improvement compared to 2001
    May be with in next 10years it may go up by another 20 to 25 percent which means around 60 percent
    I wonder how this compares to countries like China and Brazil

  6. Awesome work.

    This data can be used to analyse progress in different Taluks. Can we also know which Taluks have made the best improvement in the past 10 years.

    I presume the data is from data.gov.in.


    • Administrator said:

      thanks. the data is from the houselisting census 2011/2001.

  7. Great visualisation, as always. Could you also do a rural-only visualisation and comparison of toilets in India?

    The lack of toilets in large numbers is very much a rural problem – our cities fare a lot better (while many slums may not) but fail at providing drainage, sewerage and other necessary facilities.

    A lot of the “blue” that one can see on this map represents urbanised areas – it will be interesting to see the map without that.

    • Administrator said:

      yes its a much bigger rural, than it is an urban problem. 80% urban households have toilets vs 30% rural. might do another map of just rural.
      but there is a problem with this rural/urban distinction in the census…far as I can recall, the definition is non-uniform across censuses. plus there is a fair amount of urbanisation in what are officially rural areas even with the census’ more liberal defn of what is urban.
      and my view, for what its worth,was always that taking the ‘total’ number – rural plus urban would bring out that point anyway. its quite clear from the map that the better off areas are cities.
      but yes, all said and done, its certainly an idea for a future post…

  8. siddhant said:

    Would you pls share the source of census 2001 tables, esp district-wise toilet data.
    It is not available on official census website. I’ve dried up my all other sources as well.