Census data in India

The census data in India is available at http://www.censusindia.gov.in/, the official website for the India census.

1. Get census data

Here are the steps to get some data for a speicifc district:

  • Open http://www.censusindia.gov.in/.
  • On this website go to Census Digital Library on the left sidebar.
  • In the DIgital Library, click on the Table bar on the top bar.
  • Choose the year of the census you want the data from in the dropdown. On choosing the year, the page refreshes to give more types of data available.
  • Search for Primary Census Abstract which is the datasource we want, as it has the census information in a concise manner.
  • Under the Primary Census Abstract option, choose Primary Census Abstract Total as it gives the data for demographies.
  • Another dropdown is now seen for the State. Choose the state for which you need the data.
    • If "India" is chosen, it gives the data for India and all the states.
    • If a state is chosen, it gives the data for the state and all districts in the state.
    • Once a state is chosen, in the next page you will be able to filter by distict too. In the district level sheets, you can find population data for Taluk and village also.
  • In the data downloaded, you can find multiple columns which give different data. TOT_P is the one which has "total number of people" in that area. THe meaning of the other columns can be found at

2. Read data into python

Once the data has been downloaded, save it as a CSV file and load the data into a python list using:

  • The csv module
  • Using numpy into a numpy array
  • Using pandas into a Data Frame
  • Or simply read the file as a text file and read it line by line.

3. Finding the WIkidata page for that area

Now we need to match each row in our data to a Wikidata page which needs the population data.

To ensure that the page is correct, some possible options are:

  • Find the Name of the area and match it to the english label.
  • Ensure that the instance of is on the the follwing: Town (for Taluk or Town), district of india, or state of india and so on.
  • Check that the state is mentioned somwehere in the data.
  • Check that the country is set to India.
  • Check the English labels and aliases, and also other language labels if needed.

4. Adding the data to Wikidata

First, read the ItemPage and check that the property already exists.

  • If it does exist, and the value is different add it with a different "Source" value.
  • It if does exist, and the value is same, add a new source to the same (property, value) pair.
  • If it does not exist, create a new (property, value) pair.