Mapping public transit in Bangalore

In February, I spent some time looking at BMTC data from to understand the network better. This post first appeared on Mapbox. 

Buses are Bangalore’s most popular mode of transport. The Bangalore Metropolitan Transport Corporation (BMTC), one of the oldest transport organizations in India, operates over 2,000 routes with a fleet strength of about 6,500 buses. BMTC recorded a ridership of 5.02 million every day in September 2015, that’s on the order of daily subway ridership in New York City.

To understand this massive network better, we need open data. Public transit data in India are not available by default, but activist groups like Open Bangalore go out and create them. I spent some time last week analyzing the network, location of bus stops, timing and distribution.

Longest route

BMTC is known for its many long routes. Route 600 is the longest, making a roundtrip around the city, covering 117 km in about 5 hours. There are 5 trips a day, and these buses are packed throughout.


Next, I wanted to look at the frequency of different routes. In the image below, stroke thickness indicates how many trips each route makes in a day. You can see north Bangalore has fewer, but more frequent routes, whereas the south has more routes with less frequency. You can also see the Outer Ring Road, which circles the entire city.


I defined reachability as the destinations a passenger can get to from a given stop without changing busses. The BMTC network operates long but direct routes covering the entire city. The map shows straight lines between bus stops that are connected by a single route. The furthest you can get is from Krishnarajendra Market to the eastward town of Biskuru: roughly 49 km as the crow flies.



Which directions does BMTC run? It is interesting that BMTC covers the city North – South (blue) and East – West (brown) with almost equal distribution.


BMTC routes are categorized into different series. Starting from 1 – 9 and A – W. I analyzed coverage based on series 2 (blue) and 3 (green) and they make up almost 76% of the entire network.

For this analysis, I used QGIS and Turf.js to inspect the route data. You can see some of the scripts on Github and the maps are all made using Mapbox Studio.

Maps, Legos, Openness

I spoke about maps, legos and openness to the wonderful folks at Khosla Labs yesterday. Highlighting the story behind OpenStreetMap, and comparing other commercial entities collecting and locking location data and why this openness is a movement than a project.

I went to the Survey of India.

I went up to Dehradun last week to do a workshop on OpenStreetMap and Mapbox at the Indian Institute of Remote Sensing.

IIRS is run by the Indian Space Research Organisation (ISRO). They are also neighbors to the Survey of India – the national mapping agency. SoI governs all mapping activities in the country, maintains the National Map Policy and enforces publishing the correct international borders.

Recently, Google Maps got into trouble for large scale mapping activities without the permission from SoI.

SoI campus in Dehradun is massive and houses the only printing shop in India at the moment. They also sell some of the treasures and I was aiming for this.

The first day, they closed the store as I walked in at 4.45PM  and refused to let me do anything except for looking at the catalog; worth the walk. They sold maps worth 850 INR that day.

The most recent map catalog. 1993

I went back the next day, right after the workshop to see more of the map room and talk to the folks there.

Gentlemen there told me that they don’t print much maps anymore. Congress government cut down funds. But SoI is not concerned, he said – ‘we are over 200 years old, most of the maps are complete now, you know.’

He pointed me to this map and said the state geospatial centers have lost their power and don’t do any printing at all. ‘People aren’t buying these maps.’ – well, duh, of course.

Everything except the toposheets are stored here

I talked about how they update the maps and they didn’t have much idea, not surprising. But I found out that SoI stores all vector data in DWG. You can buy the road network in DWG for ~ INR 6000.

I bought as many as I could.

1979 Bangalore

SoI is still the primary organisation that the planning commission resorts to gather data for urban planning and infrastructure – much of this is outsourced to small agencies across the country.

2.5 years.

I joined the Karnataka Learning Partnership in May 2012. We just launched version 11.0 of our web platform.

I’ve been meaning to write this post for a while now. Recently, it marked 2.5 years of my association with the Karnataka Learning Partnership. This is not my going away post and I’m not going away. I want to talk about how amazing the environment is for someone entirely new to the public education space. I want to talk about how extraordinary the team is. I want to talk about how different our processes are. And I want to talk about how patience, understanding and teamwork will go a long way.

If you haven’t heard about the Akshara Foundation or the Karnataka Learning Partnership, KLP is incubated at Akshara Foundation and they both work closely to improve schooling in Karnataka. KLP does great amounts of work on streamlining data collection processes, building dashboards and acting as an interface between several organisations in the education space in Karnataka and India.

When I joined KLP, it was a team of three – me, Megha Vishwanath, and Shivangi Desai, headed by the inimitable Gautam John. My role was largely around organising the wealth of spatial data that we just collected and collated from various sources. Wrangling dirty data and organising things makes me happy. KLP has a pretty strong software infrastructure history. Even though Python and PostgreSQL made it to the mix, there were other unmaintained open source software and a lot of unseen complexity in the code base. To be true to my open map heart, I rewrote the maps infrastructure. It was mostly a matter of throwing in couple of new end-points to the API and writing the front-end in JavaScript. Pretty basic. I wasn’t quite ready to dive into the madness of our existing API, so I made sure I touched little of the legacy code base. Couple of months down the line, I built a dashboard for showing SSLC performance. We worked on an array of projects right after – DISE dashboard, reports, status and a lot more. We were quite sure about an overhaul of our infrastructure and soon started talking about it. I was fairly open to the idea, but concerned, considering that there are only 3 of us and a rewrite is a lot of work.

Today, we are seven people, people I must mention because I owe them so much for understanding how diverse a team could be and accepting the fact that everybody is trying – Gautam John, Bibhas Debnath, Sanjay Bhangar, Vinayak Hegde, Brijesh Poojary, Deviprasad Adiga. Megha and Shivangi did much of the tough work of getting all the things in place for us to start. Everything we have built is based on what we have had. If there is a new feature, we have made sure that all of us thoroughly understand that it is required and how it should work. Our team is geographically disconnected – between Bombay, Calcutta, Pune and Bangalore. This is not the only thing we are doing. Each of us are involved in several other exciting projects and have weird schedules that barely overlap. To me, it is amazing to see how we have pulled this new platform in under five months. We have met twice in the process and rest of it happened over video conferences and telephone calls. I personally have had a very rough time over the last two months, which was when we were gearing up towards the crunch period. I was moved by the way the team managed to make sure that I was involved in a very limited capacity, but made sure that what needs to be done was taken care of.

To be honest, rewrites are hard. I try to avoid them as much as possible but when software becomes a liability, you have to make sure it works and continues to do so. Rewrites are usually a fairly intense process, because you are never starting from a clean slate. For the most part, you have a team which doesn’t quite understand most of how the legacy system works. Disconnect within the team is not uncommon, but it’s difficult. I have seen how the seven of us accommodated each of the ideas on the table. It’s about listening and understanding each other. It’s about respecting and realising that the other person is also committed to building the best product. It’s about being polite and being patient. And finally it’s about embracing the fact that there are only three certainties – life, death and fucked up data.

Update: We also work with some of the best technologists on and off, most recently Vamsee Kanakala and Rahul Gonsalves along with his team at Uncommon.

OpenStreetMap as Infrastructure – The Fifth Elephant, Bangalore, 2014

I spoke at the premier data conference in the country yesterday, the Fifth Elephant run by HasGeek, about using OpenStreetMap as infrastructure for geographic datasets and applications featuring Moabi – a collaborative mapping platform for monitoring natural resources extraction in the Democratic Republic of Congo. Find the summary of the narration here and a more detailed outline here. The slide deck is below.

Download (PDF, 6.12MB)



Bringing together map enthusiasts in Bangalore.

A few months back, Kaustubh and I started GeoBLR – Bangalore’s monthly spatial gathering. Few weeks back we did the fifth meetup. I have been wanting to write why I’m organising GeoBLR and more importantly, why I am taking it slow.

We started off GeoBLR to keep it quite different from other events in town. To begin with, we don’t necessarily have someone speaking at all the events. The GeoBLR events are more open in terms of what we want to do. GeoBLR runs closely with the DataMeet on issues centric to spatial data and maps. We had several discussions around the spatial data situation in India and how building proper relationships at the government and non-government level is important for the community to gain access to the datasets.

There has never been a space in Bangalore to talk about issues like this. When proprietary companies around the world are trying to be the single source of ground truth, opening map data is a critical task. Improving OpenStreetMap is at the core of our agenda. GeoBLR will be a space for people to come and talk about maps, discover new tools, identify missing datasets, find them, and solve spatial data related issues.

I have been getting fair amount of requests to turn GeoBLR into a series of workshop and I’m not keen on that idea. GeoBLR, in a way, is an experiment for me. From simple things like ‘which day of the week/month is best for people to attend the event’ to ‘what model the event should focus’, I’m learning a lot and subsequent events get more clarity.

If you want to learn more, join us!

Crowdsouricng Data: Strategies, Stories, Tools.

I was a facilitator at the Techcamp Bangalore where I introduced several strategies of crowdsourcing data to the broad group of non-profit organisations. My idea was to walk the participants through two stories that I’m personally part of – Akshara Foundation and the Humanitarian OpenStreetMap Team – by asking four key questions – What data to collect, from whom to collect, how to collect and, how to verify. We had some interesting conversations at the event but most of them were in to learn about more tools. I put together a small slide deck and a repository for collecting tools and reading material.