A Web of Traffic


Lab Reports, Networks

Here’s the third piece in my exploration of Bangalore’s traffic crisis. Previously, I’ve used charts and maps to visualize a Kaggle dataset on Bangalore city’s traffic recordings from 2022 to 2024. This dataset looks at specific roads in specific neighborhoods and records metrics such as congestion levels, travel time, environmental impact etc.

A map has been especially useful, given the spatial nature of this problem. Given the overlap between maps and networks, I thought that a network visualization using the same dataset could also put things into perspective.

Approaching this project itself was guided by wanting to use the same dataset for charts, maps and networks. It has been limiting, but I think the constraint has also given me the room to thoroughly understand the dataset I’m working with, and see how I can repurpose and manipulate it to visualize it in different ways.

Formatting the Data

The initial dataset wasn’t geocoded, but just mentioned the data, road and neighborhood where all metrics (such as congestion levels, parking usage etc.) were measured. While working on the maps, I used generative AI for the geocoding, which gave me the latitudes and longitudes to map the data.

Continuing to use the geocoded dataset, I needed to tweak it in order to make it suitable for creating a network. There were more than 8000 observations across 16 roads, and 8 neighborhoods (2 roads per neighborhood). I again used AI to condense the data and get the average metrics for each of the 16 roads, across all the observations for that road from 2022 to 2024. And then, 2 roads are connected if they are in the same neighborhood (eg: CMH Road and 100 feet road are both in Indiranagar).

Visualizing this on Gephi then, my first iteration looked like this.

I used a geo layout on Gephi which allowed me to map out the roads as geographically laid out in Bangalore (eg: Hebbal and Ballari being in north Bangalore, Jayanagar and South End Circle being in south Bangalore). The colors are to differentiate between the different areas, such as Indiranagar containing CMH road and 100 feet road. I did bring in the average congestion levels as weights, however, given how high congestion is, it isn’t immediately visible. The differences in congestion levels doesn’t get highlighted in the above graphic. The eye is instead immediately drawn to the eight different colors. This network also presents the different road names overlapping, and there’s not enough space through the entire visualization. Perhaps most importantly, the depth of the geo layout isn’t communicated with a white background. Imposing this on a map would help contextualize things better.

Working with Vectors and Playing with Map Backgrounds

To take things forward with the map, I exported a vector of this network and laid it over a vector of a Bangalore map. I wanted to see how the visual looked. The first thing that helped was being able to resize the fonts easily and move around how I wanted to place the names of the roads. I could also change the background colors of the map so that the network is the highlight. However, there are also issues with this.

While the geo layout of the network is spatially mapping things out, when I lay it out on the vector of the map, the areas don’t fall exactly where needed. Scaling and resizing 2 vectors while staying true to the data is hard. I would want to be able to lay it out accurately.

Again, circling back to the other main issue, the focus of this network is to tell a story about the differences in congestion levels. I received some feedback on how the edges are the focus here, and the nodes, and I should reshape the visualization accordingly.

That’s the next step I would like to take: recrate the network with a focus on the edges to show the differences in congestion across areas, and then lay this network over the map with more accuracy. Beyond just the visualization, I think I want to spend more time understanding graph theory, and the other advanced math behind networks. It would allow me to feel more confident in creating networks. While the focus is on visualization, I think I would have enjoyed this more and done it more justice had I spent more time on the math.

Leave a Reply

Your email address will not be published. Required fields are marked *