Karnataka ground water quality

We took Karnataka’s ground water quality data from a 2004 Karnataka Rural Water Supply and Sanitation Agency (KRWSSA) report (via IndiaWaterPortal), and tried to see if there were any patterns.

The executive summary of the report shows the number of villages in each district affected by problems of excess nitrate, iron, fluoride or total dissolved salts. We plotted those on the district map.


The interesting pattern is that emerges is that the places that have excess nitrate (NO3) concentration are the ones that have excess iron (Fe) concentration as well. The places that have excess fluoride (F) concentration are the ones that have excess salts (TDS).


The correlation scatterplot alongside further demonstrates this point. There is a fairly good correlation between Fe and NO3, and between TDS and F. There’s little correlation across these groups however.

(From a glance at the scatterplots, though, it becomes immediately obvious that this is based on too few data points.)

We can also readily see that the bulk of the water quality issues are in interior Karnataka. The coastal areas are relatively fine.

Geographic visualisations are an extremely powerful way of inferring patterns when the underlying data is geographic in nature. At Gramener, we use our visualisation server to automatically create graphs such as these based on an underlying data source.

We have provided a sample of our tool at http://gramener.com/indiamap. You can enter your own data and see how it shows up on any district or state map. Happy mapping!

Visualising Indian Elections

When the Election Commission results for the 2011 assembly elections came out, we thought we’d take a look at the results for Tamil Nadu.

The easiest way to see geographic data is, of course, on a map. Since the results are announced constituency-wise, it makes logical sense to plot each constituency on the map.

However, map-based visualisations suffer from one problem: the area of a geographic region is not always proportional to its importance. In elections, each constituency equal weightage: one seat. But the areas can vary considerably. Chennai, for instance, is a tiny dot on the map, but yet is split into three different constituencies.

A better way is to take an approximation of the map. We can plot each constituency as a block, and position it roughly at its geographic location, and roughly preserve adjacency. This gives a reasonably good geographic picture, while showing relative importance accurately.

For example, here is a world map: the area is proportional to each country’s population.


We did the same for Tamil Nadu. Below is an interactive map that shows voter turnout. Hovering over each cell will show the number of voters that turned out in that constituency. Black shows higher votes, white shows fewer voters.

Voter turnout

Men turnout

Women turnout

The number of the registered voters ranges from 140,000 (Kilvelur) to 360,000 (Shozhinganallur). Each box represents one constituency, with a position approximating its geographic location. This is a reasonably good proxy for a constituency density map.

Now, let’s take a look at voter turnout.


Turnout% men

Turnout% women

The voter turnout was pretty high, at 78%. Not too different between the men (77.7%) and women (78.5%), but quite different across constituencies. Palacodu, Kulithalai and Veerapandi led the pack with turnouts of 87%, 89% and 89% while Chennai Harbour, Killiyoor and Colachal bottom at 64% each. The lowest turnouts are concentrated around Chennai, Coimbatore and Kanyakumari – interestingly these are the more affluent areas.

% votes: ADMK

% votes: DMDK

% votes: DMK

Clearly, ADMK has swept the elections. What’s interesting is that they won absolute majorities in a number of areas (highlighted by the darker shades of green), unlike DMK or MDMK, who mostly won simple majorities.

% margin: ADMK

% margin: DMDK

% margin: DMK

A number of ADMK victories were by a large margin, but so were some of the DMDK and DMK victories. AKT Raja of DMDK won Thirupurankundram with a 30% margin, for example. Former Chief Minister M. Karunanidhi (DMK) won with a comfortable 29% margin at Thiruvarur as well. Vijaykant (DMDK) managed an 18% margin at Rishivandiyam. It is interesting that 92% women voted at Rishivandiyam – significantly higher than anywhere else in the state.

Visualising the Indian Budget

india-budget-comparisonThe last Indian budget stood at Rs 1,020,838 crores (about 227 billion US dollars). Take a look at this picture to get a sense of how big that is. It’s slightly more than Africa’s debt to the Western world, a bit under the cost of a manned mission to Mars, and half the Chinese government’s stimulus package. It’s two-thirds of Wal-Mart’s revenues, and over 4 times Bill Gates’ net worth. (See The Billion Dollar-o-gram.)

Put another way, it’s the income tax collected from 10 lakh Sehwags or Dhonis, 1,600 Van Gogh portraits, or just 100 residences like Antilia, Mumbai.

We decided to take a closer look at the budget to see how this money was being spent, and how this has changed over the last 10 years, based on data from the Union Budget.

Here’s a short video giving an overview of the budget and some observations.

Let’s take a closer look:


The budget has tripled over the last 10 years in nominal terms, from 338 thousand crores to 1,020 thousand crores. But if you adjust for inflation (using WPI), it’s doubled In 2010 terms, the budget in 2000-2001 was Rs 493 thousand crores. That’s a 6% growth in real terms (12% nominal) — about in line with the GDP growth. The graph also shows acceleration. The growth over the last 4 years was 12% in real terms — twice that over the last 10 years.


The top expense, interest payments, is over a fifth of the budget. It has more than doubled in nominal terms over the last 10 years. But in real terms, that’s not too big — just a 3% growth. The bulk of this growth has happened in the last 4 years. Interest payments only accounts for 14% of the real increase in the budget.


The Central Plan has a different story, however. It’s grown to the second largest item, but 10 years ago, it was just 10%. It has experienced the fastest growth: 16% in real terms. In terms of contribution to the real budget increase, this is the single largest contributor, at 29%.


Subsidies have grown considerably as well, though not as much as the Central plan. They contribute 16% — about as much as interest payments — to the real budget increase, but what’s interesting is the surprisingly large growth in recent times.


A pattern that is emerging is the recent growth in expenditure. Many items have had a substantial increase in the recent past. Defence revenue expenditure, pensions, police, social services, etc. have had a marked increase in the last year. Many others, like interest payments, subsidies and central assistance have grown considerably over the last few years. This may be a pattern worth investigating further.