Passenger trains from Chennai Central to Palghat Junction

Shilpa
5 min readSep 11, 2017

--

Data Visualisation Class Assignment

As a kid, train journeys to me always meant going to my native place, Palghat in Kerala, from my hometown Chennai, Tamil Nadu. Alleppey Express, train number 22639 (my father is always very particular about mentioning train numbers), has always been our default mode of commute during holidays, so much so that back then, I used to think that 22639 was the only way one could travel to Palghat.

I decided to look up this very route when a data visualisation assignment was given in class for us to explore data viz options. The initial dataset given was from the website data.gov.in, an open government data platform in India. This .csv file contained about 69,000 rows of data, with various attributes like train name, number, source and destination stations, departure and arrival time, total distance, intermittent station list etc.

690007 trains!

All I had to do to bring this number to something way less overwhelming was apply a filter at the Destination column. Now I had a dataset with just 106 trains, much solace.

106 trains to Palghat from all over India

This was further brought down to about 20 trains, by considering only the trains from Chennai to Palghat- Chennai not necessarily being the source station of a given train. The above dataset didn’t give me all the data I needed. So I scraped some data off IRCTC and Make My Trip for more attributes. Column Copy, a Google Chrome extension came in handy. My data set now looked something like this:

MAS to PGT passenger trains
Intermittent Stations details

I was hoping to look at the following details from the parsed data:
-departure and arrival
-intermittent stations
-halt time and duration

Considering that my coding skills are poor (read nil), I looked up some web based data visualisation tools. Tableau, Raw Graphs, Infogram, Datamatic, ToastUI Charts are some of the tools that I tried my hands on. All these tools required the inputs for x and y axes of any graph to be numbers, whereas mine were strings.
I tried creating a mock-up for a static chart on Adobe Illustrator CC.

Mock-up

Having the total distance attribute in the x-axis didn’t help much (had used it because Ai charts tool asked for at least one attribute to be a number input).
I resorted to then plotting the chart in Sketch (mac application).
I also used the Launchpad plugin for minimal interactivity.

Trains available for a particular day of the week.
Halt details for intermittent stations on hover

I then used Adobe Muse CC to make a very simple interactive visualisation.
The axes, train names, numbers, intermittent station names, legend etc were first inserted using basic text and shape tools .
Windows>widget library>tooltip (drag and drop) is the option that I used next.

Each Tooltip opens up with a default image and text bubble on click.

The tooltips for time of halt at each station in the graph were first created (The plus symbol next to each circle was used to add a new intermittent station onto the graph).

Composition Options for the first set of tooltips with halt time

The checkboxes for the days of the week were also created by modifying the tooltip function ( nesting the intermittent station data as the tooltip content for each day), and by editing the trigger options for different states as shown below.

checkboxes for the legend

The final output shows the availability of trains based on the day of the week selected using the checkboxes in the legend:

The time of halt and its duration at each intermittent station is shown on hover:

The final screen

The orange and blue colours denote day and night respectively, thus giving us a quick visual of the day and night journey period. (I had always thought that there were more number of ‘night trains’ to PGT)

The intermittent stations are denoted by circles of different sizes, color coded based on halt time. Katpadi Junction, Salem and Erode are the 3 stations where any train from MAS to PGT halts. (Again, I earlier had a notion that any train going to Kerala would definitely stop at Coimbatore, which now I know isn’t true.)

Erode is the station where the halt duration is maximum, followed by Coimbatore and Salem.

This was the dataset used.
You can view the visualisation here. (NoobAttempt Alert: The checkboxes take a while to load, as what I have done here is not the best practice)

P.S. Alleppy Express (22639) leaves right after our usual dinner time and reaches Palghat a little past 5am; by then my household is usually up and running, so we always have someone picking us up from the station, only to be welcomed with a nice hot cup of filter coffee at our grandma’s place by 6am. Yes, stereotype much, but in the end, maybe it all does boil down to a nice cup of hot coffee for us South Indians :)

--

--