How safe is your travel?

Pallavi Ekka
5 min readSep 10, 2017

Train travel are one of the most exciting mode of journey for many travelers. There are all sought of travelers; travelers who travel with their family or travelers travelling solo and hence it is necessary that we are careful and safe.

You can find both the visualization here https://pallavimonicaekka.github.io/

The first step towards this small exercise was to identify appropriate data to visualize. Primarily, two categories of data was required for this exercise, one of the route of all the trains and the other of the registered criminal cases in the railways.
The first set of data was downloaded from https://data.gov.in/catalog/indian-railways-train-time-table-0. The CVS file contains the train number, train name, Intermediate stoppage list number, station code, station name, arrival time, departure, distance, source station code, source station, destination station code and destination station name. The file looks something like this

From this data I picked up all the trains leaving from the stations H NIZAMUDDIN and NEW DELHI.

The set of data that was required was of the railway crimes registered across the nation. I found the data on the website of the Ministry of Railways, Govt. of India in the chapter titled ‘Crime in Railways’ which you can find here http://ncrb.nic.in/StatPublications/CII/CII2015/chapters/Chapter%2019-15.11.16.pdf. TABLE-19.1(A) gives ‘the Incidence of Total IPC Crimes Registered by GRP and Percentage variation During 2013–2015’

Combining these two data, we could estimate the approximate measure of safety of a route as it passes through the different states in the country.

VISUALIZATION (1)

https://pallavimonicaekka.github.io/train-routes-visualization1-/linecolor.html

The first visualization that I did was very instinctive in nature. The visualization could be found below.

In the above visualization, two routes starting from Delhi to Ahmedabad have been shown. The first route starts from Delhi, goes through Haryana, Rajasthan and finally enters Gujrat to reach Ahmedabad. The second route starts from Delhi, passes through Haryana, Uttar Pradesh, Rajasthan, Madhya Pradesh and then enters Gujarat. The width of the route changes depending on the number of crimes registered. For example, in route two, the width of the route at two places changes significantly, first when it enters Uttar Pradesh and second when it enters Madhya Pradesh. Uttar Pradesh and Madhya Pradesh crime rank is 20 and 21 among 22 states for which data is available. This can clearly be seen in the visualization. Hence, if you’re planning to go to Ahmedabad from Delhi, you might want to consider taking the 1st route from the perspective of safety.

Steps Involved :
In order to develop this visualization, Mapbox API was used. On top of it the route was mapped. Please note that these are not the actual railway routes but are the paths which connect the intermediate stations on the route.

To draw the route on the map, the Geo-coordinates of the stations as well as the the points where the path crossed each state was required. The coordinate for the stations were extracted by using a google sheet Add-on called Awesome Table. The ordinates of the points where the routes were marked and attained from Mapbox studio.

After getting all the required Geo-coordinates, the route was divided into segments on the basis of the route passing through the different states and width of the segment was assigned to it considering the crimes rates. Since the difference in the number of registered crime rates was very large, the number was scaled down so that it could be represented demographically.

Advantages of such a visualization is that it gives an overview picture and helps compare routes easily. The disadvantage are that not many routes can be plotted simultaneously on the map demographically since it would decrease clarity. Some may argue that the crime numbers can be represented through color codes but since the number of states to be presented is 22, which is considerably high, the change in the gradient might not be easily visible. Also the intensity of rise and fall of the crime rate would also not be easily perceivable. This kind of visualization might also not be suitable for display all routes at once because many routes are similar and overlap.

VISUALIZATION (2)

https://pallavimonicaekka.github.io/train-routes-visualization1-/linecolor.html

The second visualization is completely independent of the demography of the routes though it has been tried to keep the visual information intact as in the previous visualization.

This visualization displays train numbers. On-click, the states through which the trains pass through becomes visible. The font size and color have been codified according to the number of crimes registered in that state. This helps is perception of the safety of the route. The bigger and darker the name of the state is, more is the number of crimes registered.

This visualization helps view many trains and also does not create any clutter on the display. One feature that has not been currently incorporated due to technical difficulty is the comparison of two routes.

You can find the codes to both the visualizations here.https://github.com/pallavimonicaekka/train-routes-visualization1-
https://github.com/pallavimonicaekka/train-routes-visualization2-

Some of the fundamental questions that came up while working on these visualization was how this data was collected. What if the crime was committed somewhere and was reported elsewhere? The crimes rates could also depend on the railway network density of the state.

As an explanation to the first question, Every police station has jurisdictional area for which they can take up the investigation. Suppose my phone is stolen at the New Delhi Railway station, then the police station under whose jurisdiction the New Delhi Railway station is will lodge my FIR and investigate it. But in Zero FIR , any police station can register FIR irrespective of jurisdictional area but the investigation will be taken up by the police of the place of occurrence of incidence was reported in FIR. The police station register the zero FIR marking as serial no. zero and transfer to the competent jurisdictional area which can carry out the investigation.

As far as the crime rate is concerned, yes, the no of crimes commuted and reported will also depend on the railway network density of the state. I haven’t yet tried mapping the network density vs the crime rates but it would also be an interesting study to do, especially if any outliers occur!!

Resources

  1. Data of the trains : Routes, trains from Delhi, state wise crime rank

--

--