India has one of the largest rail
networks in the world. Since the establishment of railway tracks,
travelling has become easy. More than one lakh trains operate around
India every single day and carry millions and billions of passengers.
Indian railways are cost-effective, reliable and environment friendly
that’s why it is often called as the
"lifeline of the nation". Every day thousands of passengers
use the Indian rail network to reach their destinations.So it is
essential to ensure the safety of passengers.
Actually the term
‘accident’ envelopes a wide spectrum of occurrences with or without
significant impact on the system.These consequential train accidents may
be due to collisions, derailments, fire in trains, road vehicles
colliding with trains at level crossings, and certain specified types of
‘miscellaneous’ train mishaps.
The country has witnessed several
tragic train accidents.Recently, on 2nd June, one of the deadliest train
accidents took place three trains collided in Odisha Balasore , nearly
300 passenger died and nearly 1000 injured.
The Coromandel Express collided with
a stationary goods train, causing many of its carriages to overturn,
some of which fell onto another train, the Bengaluru-Howrah Superfast
Express, which was also passing by at the same time on 2 June
2023. (Image Source: PTI)
Simplified diagram of the 2023
Odisha train collision
-> Now we will explore the
total number of passengers killed in train accidents since 2000 in
India, shedding light on the safety of rail travel and the measures in
place to prevent such incidents.
Number of Passengers killed and injured in train accidents
(since 2000)
library(readxl)
data1 = read_excel("/Users/khushi/Documents/EDA_Analysis_of_train_accidents/Data_of_train_accidents.xlsx",sheet='Killed')
library(tidyr)
data_pivot <- pivot_longer(data1,
cols = c("Number_of_Passengers_ Killed","Number_of_Passengers_ Injured"),
names_to = "Passengers_Killed",
values_to = "Number")
library(ggplot2)
ggplot()+
geom_col(data = data_pivot,
aes(x=Y,y=Number,fill=Passengers_Killed),
position = "dodge")+
ylab("Number of Passengers")+
xlab("Year")+
labs(title = " Number of Passengers killed and injured in train accidents")

Primary Reasons behind Railway Accidents
Train accidents can be categorized
into four primary types: Collisions, Derailments, and Fires. Each of
these types has its own set of causes and contributing factors. Here’s
an explanation of the reasons for train accidents in these
categories:
1.Collisions: Train collisions are
railway accidents that occur when two or more trains come into contact
with each other. These collisions can have serious consequences,
resulting in injuries, fatalities, and extensive damage to railway
infrastructure.
2.Derailments: Train derailments are
railway accidents in which a train leaves the tracks, leading to
potentially disastrous consequences.
3.Fire in
trains: Fires in trains are hazardous incidents that pose a
significant risk to passengers, railway personnel, and railway
infrastructure.
4.Level Crossings: Many railway
accidents occur at level crossings where trains intersect with roads.
Poorly marked or unprotected crossings, as well as driver negligence,
can lead to collisions.
To know what is the main cause of
accidents we took the data having these variables.
library("readxl")
data = read_excel("/Users/khushi/Documents/EDA_Analysis_of_train_accidents/Data_of_train_accidents.xlsx",sheet='Table 1')
library(ggplot2)
data = read_excel("/Users/khushi/Documents/EDA_Analysis_of_train_accidents/Data_of_train_accidents.xlsx", sheet=1)
ggplot(data) +
geom_line(mapping = aes(x = Y, y = Collisions, color = "Collisions")) +
geom_point(mapping = aes(x = Y, y = Collisions, color = "Collisions")) +
geom_line(mapping = aes(x = Y, y = Derailments, color = "Derailments")) +
geom_point(mapping = aes(x = Y, y = Derailments, color = "Derailments")) +
geom_line(mapping = aes(x = Y, y = Fire_in_trains, color = "Fire in trains")) +
geom_point(mapping = aes(x = Y, y = Fire_in_trains, color = "Fire in trains")) +
geom_line(mapping = aes(x = Y, y = Level_crossing_accidents, color = "Level crossing accidents")) +
geom_point(mapping = aes(x = Y, y = Level_crossing_accidents, color = "Level crossing accidents")) +
scale_color_manual(values = c("Collisions" = "blue", "Derailments" = "red", "Fire in trains" = "green", "Level crossing accidents" = "yellow")) +
labs(color = "Causes of Train Accidents")+
ylab("number of train accidents")+
xlab("Year")+
labs(title = " Causes of Train Accidents Over the Years")

we observed that the total number of
accidents is higher in the case of derailments for the Years from 1970
to 2010, it suggests that derailments might be a significant cause of
train accidents for this specific time period.
data5 = read_excel("/Users/khushi/Documents/EDA_Analysis_of_train_accidents/Data_of_train_accidents.xlsx", sheet='Table 12')
ggplot(data5)+
geom_bar(aes(x="", y=Total, fill=Causes),
stat="identity", color="white")+
coord_polar("y", start=0)+
ggtitle("Number of Accidents")+
theme(plot.title= element_text(hjust = 0.5, size=20),
axis.title = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank(),
panel.grid = element_blank(),
panel.border = element_blank())

library("VennDiagram")
## Loading required package: grid
## Loading required package: futile.logger
grid.newpage()
draw.pairwise.venn(area1 = 3076,
area2 = 2183,
cross.area = 2183,
fill = rainbow(2),
category = c("Accidents","Derailments"))

## (polygon[GRID.polygon.252], polygon[GRID.polygon.253], polygon[GRID.polygon.254], polygon[GRID.polygon.255], text[GRID.text.256], text[GRID.text.257], lines[GRID.lines.258], text[GRID.text.259], text[GRID.text.260])
Total number of accidents is 3076 for
the year 2000 to 2018. Out of which 2183 are due to
derailments.
Broad Causes of Train Accidents
1.
Collisions:
a)Signal Failures:
Malfunctioning or misinterpretation of signals can lead to collisions.
Trains rely on signaling systems to maintain safe distances and
directions, and any failure in the signaling system can be
catastrophic.
b)Human Error: Train operators may
make mistakes, such as failing to obey signals, misunderstanding
instructions, or not following proper procedures. Inadequate training,
fatigue, and distraction can contribute to human
errors.
2. Derailments:
a)Track
Defects: Poorly maintained tracks, damaged rails, and worn-out
or improperly aligned switches can cause derailments. This is especially
true in regions with inadequate track
maintenance.
b)Equipment Failures: Mechanical
failures in the train’s rolling stock, such as brake failures or wheel
problems, can result in derailments.
3. Fires in
Trains:
a)Electrical Faults: Short
circuits, damaged wiring, or electrical system failures can lead to
fires on trains, especially in older train cars with outdated
wiring.
b)Sabotage and Acts of Terrorism: In some
cases, railway accidents result from deliberate sabotage, including acts
of terrorism. These incidents can have devastating consequences for
passengers and railway infrastructure.
data4 = read_excel("/Users/khushi/Documents/EDA_Analysis_of_train_accidents/Data_of_train_accidents.xlsx", sheet='Table 13');
ggplot(data4, aes(x = "", y = No_of_accidents, fill = Broad_causes)) +
geom_bar(stat = "identity", width = 1) +
coord_polar(theta = "y") +
theme_minimal() +
labs(fill = "Broad Causes") +
ggtitle("Number of accidents (Broad Causes of Train Accidents)")

library(gridExtra)
df= read_excel("/Users/khushi/Documents/EDA_Analysis_of_train_accidents/Data_of_train_accidents.xlsx", sheet='Table 3')
p1<-ggplot(df, aes(x = Y, y = Failure_of_Railway_Staff)) +
geom_line(color = "blue") +
labs(x = "Year", y = "Failure of Railway Staff")
p2<-ggplot(df, aes(x = Y, y = Failure_of_Person_other_than_Railway_Staff)) +
geom_line(color = "red") +
labs(x = "Year", y = "Failure of Person other than Railway Staff")
p3<-ggplot(df, aes(x = Y, y = Failure_of_Equipments_Rolling___Stock)) +
geom_line(color = "green") +
labs(x = "Year", y = "Failure of Equipments Rolling Stock")
p4<-ggplot(df, aes(x = Y, y = Failure_of_Equipments_Track)) +
geom_line(color = "violet") +
labs(x = "Year", y = "Failure of Equipments Track")
p5<-ggplot(df, aes(x = Y, y = Failure_of_Equipments_Electrical)) +
geom_line(color = "black") +
labs(x = "Year", y = "Failure_of_Equipments_Electrical")
p6<-ggplot(df, aes(x = Y, y = Sabotage)) +
geom_line(color = "orange") +
labs(x = "Year", y = "Sabotage")
grid.arrange(p1, p2, p3, p4, p5, p6, ncol=3, nrow=2)

State-wise number of Manned and Unmanned Level Crossings
There are 19,507 Manned Level
Crossings and 5792 Unmanned Level Crossings in the country as on
01.04.2018.
data2 = read_excel("/Users/khushi/Documents/EDA_Analysis_of_train_accidents/Data_of_train_accidents.xlsx", sheet='Table 10');
## New names:
## • `Number_of_Manned__Level_Crossings_` ->
## `Number_of_Manned__Level_Crossings_...3`
## • `Number_of_Unmanned_Level_Crossings` ->
## `Number_of_Unmanned_Level_Crossings...4`
## • `Number_of_Manned__Level_Crossings_` ->
## `Number_of_Manned__Level_Crossings_...7`
## • `Number_of_Unmanned_Level_Crossings` ->
## `Number_of_Unmanned_Level_Crossings...8`
## • `Number_of_Manned__Level_Crossings_` ->
## `Number_of_Manned__Level_Crossings_...9`
## • `Number_of_Unmanned_Level_Crossings` ->
## `Number_of_Unmanned_Level_Crossings...10`
library(gridExtra)
pl1 <- ggplot()+
geom_col(data = data2,
aes(x=State,y=MLC))+
ylab("Number of Manned Level Crossings")+
coord_flip()+
xlab("States")
pl2 <- ggplot()+
geom_col(data = data2,
aes(x=State,y=UMLC))+
ylab("Number of Unmanned Level Crossings")+
coord_flip()+
xlab("States")
grid.arrange(pl1,pl2, ncol=2)

Accidents at Unmanned Level Crossings
The number of accidents/causalities, due to Unmanned Level Crossings
in the country, from 2010-11 to 2017-18 and the current year 2018-19
(upto May 2018) are shown below:
library(gridExtra)
data3 = read_excel("/Users/khushi/Documents/EDA_Analysis_of_train_accidents/Data_of_train_accidents.xlsx", sheet='Table 9')
plot1<- ggplot()+
geom_col(data = data3,
aes(x=Y,y=Number_of_accidents_at_Unmanned_Level_Crossings, col=factor(Y)))+
ylab("Number of Accidents at Unmanned Level Crossings")+
ggtitle("Number of Accidents at Unmanned Level Crossings")+
xlab("Year")
data6 = read_excel("/Users/khushi/Documents/EDA_Analysis_of_train_accidents/Data_of_train_accidents.xlsx", sheet='Table 9')
plot2<-ggplot(data6, aes(x = Y, y = Number_of_accidents_at_Unmanned_Level_Crossings)) +
geom_smooth(method = "loess", color = "red") +
labs(x = "Year", y = " ") +
theme_classic()
grid.arrange(plot1, plot2, ncol=2)
## `geom_smooth()` using formula = 'y ~ x'

It is the endeavor of the Ministry of Railways to eliminate all
Unmanned Level Crossings, in a phased manner, by either of the
following:-
- Closure - Closing Unmanned Level Crossings having NIL/ negligible
Train Vehicle Unit (TVU).
- Merger - Merger of Unmanned Level Crossing to nearby Manned/Unmanned
Level Crossing or Subway/Road Under Bridge (RUB)/Road Over Bridge (ROB)
by construction of diversion road.
- Provision of Subways/RUBs.
- Manning- Phased manning of unmanned level crossings which cannot be
eliminated by the above means.
Damage to Railway Property
Details of the damage to railway property and interruption to
communications caused by train accidents since 2000
data7 = read_excel("/Users/khushi/Documents/EDA_Analysis_of_train_accidents/Data_of_train_accidents.xlsx", sheet='Table 6')
library(tidyr)
data7 <- pivot_longer(data7,
cols = c("Cost_of_Damage_RollingStock","Cost_of_Damage_PermanentWay"),
names_to = "Damage",
values_to= "Rupees")
ggplot()+
geom_col(data = data7,
aes(x=Y,y=Rupees,fill=Damage),
position = "dodge")+
ylab("Damage")+
xlab("Year")+
labs(title = "Damage caused to Indian Railways (in Lakhs)")

Mission ‘Zero-Accident’
In the Railway Budget 2016-17, Mission Zero Accident was announced,
comprising of the two sub-missions:
Elimination of Unmanned Level Crossings: As on 01.04.2017, Indian
Railways have 27181 Level Crossings, out of which 19480 are manned and
7701 are unmanned. Out of total 7701 unmanned level crossings, 4943
level crossings are on BG (Broad Gauge). It had been planned to
eliminate unmanned level crossings (UMLCs) on Broad Gauge by
2020.
TCAS (Train Collision Avoidance System): To prevent collisions
and signal passing at danger by the Loco Pilot through developing an
indigenous technology and also to increase throughput by increasing
average sectional speed on Indian Railways (IR). In order to improve
signaling, electrical/electronic interlocking system with centralized
operation of points and signals are being provided to eliminate human
failure and to replace old mechanical systems. Superior and safer Linke
Hofmann Busch (LHB) Coaches having anti-climbing features have been
progressively introduced on Indian Railways to reduce the fatalities in
case of accidents.
Trend of the acidents over the year
ggplot(data) +
geom_line(mapping = aes(x = Y, y = Total)) +
geom_point(mapping = aes(x = Y, y = Total))+
ylab("Accidents")+
xlab("Year")+
ggtitle("Total number of train accidents:
Trend over the year")

This plot show that there is a significant decline in the number if
accidents over the years. This is the result of the steps taken by the
Ministry of Railways, however it remains essential to sustain these
efforts and further enhance safety measure to ensure the continued
decline in train accidents.
Bibliography:
- India. Ministry of Railways, Outcome and Performance Budget,
2016-17, pg.50.
- India. Ministry of Railways, Safety Performance 2014-15, URL: http://www.indianrailways.gov.in/railwayboard/uploads/directorate/safety/downlo
ads/Ch1-eng-0304.PDF
- Information provided by Ministry of Railways vide Office Memorandum
No. 2018/Safety(A&R)/15/1.
- Lok Sabha Starred Question No.42 dated 19.07.2017 .
- Lok Sabha Unstarred Question No.3013 dated 11.08.2017.
- Rajya Sabha Unstarred Question No. 3867 dated 09.08.2017.
- Rajya Sabha Unstarred Question No. 2194 dated 05.01.2018.
- PIB Release dated 05.01.2018.
………………………………………………………………………………………………………………………………………….
In R, the sessionInfo() function is used to obtain information
about the current R session.This function provides details about the
version of R that is running, the operating system, the loaded packages,
and various other configuration details.
sessionInfo()
## R version 4.3.1 (2023-06-16)
## Platform: aarch64-apple-darwin20 (64-bit)
## Running under: macOS Sonoma 14.2.1
##
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0
##
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
##
## time zone: Asia/Kolkata
## tzcode source: internal
##
## attached base packages:
## [1] grid stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] gridExtra_2.3 VennDiagram_1.7.3 futile.logger_1.4.3
## [4] ggplot2_3.4.2 tidyr_1.3.0 readxl_1.4.3
##
## loaded via a namespace (and not attached):
## [1] sass_0.4.7 utf8_1.2.3 generics_0.1.3
## [4] futile.options_1.0.1 lattice_0.21-8 digest_0.6.33
## [7] magrittr_2.0.3 evaluate_0.22 fastmap_1.1.1
## [10] cellranger_1.1.0 jsonlite_1.8.7 Matrix_1.6-0
## [13] formatR_1.14 mgcv_1.9-0 purrr_1.0.1
## [16] fansi_1.0.4 scales_1.2.1 jquerylib_0.1.4
## [19] cli_3.6.1 rlang_1.1.1 munsell_0.5.0
## [22] splines_4.3.1 withr_2.5.0 cachem_1.0.8
## [25] yaml_2.3.7 tools_4.3.1 dplyr_1.1.3
## [28] colorspace_2.1-0 lambda.r_1.2.4 vctrs_0.6.4
## [31] R6_2.5.1 lifecycle_1.0.3 pkgconfig_2.0.3
## [34] pillar_1.9.0 bslib_0.5.1 gtable_0.3.3
## [37] glue_1.6.2 xfun_0.40 tibble_3.2.1
## [40] tidyselect_1.2.0 rstudioapi_0.15.0 knitr_1.44
## [43] farver_2.1.1 htmltools_0.5.6.1 nlme_3.1-162
## [46] rmarkdown_2.25 labeling_0.4.2 compiler_4.3.1