(English version) National Road Safety Profile - Romania
  • AI Chat
  • Code
  • Report
  • Beta
    Spinner

    🚓 National Road Safety Profile - Romania

    Made by @Alexandra Grecu

    ❗This analysis marks the initial phase of my dissertation project, comprising solely of data validation, data cleaning, and data exploration.

    ❗Since the data is confidential, it has been modified and sensitive variables have not been included.

    ❗Although the analysis I have conducted and am still working on is in Romanian, I have tried to translate the dataset into English to make it comprehensible for all people who will read this analysis. The original project can be found here.

    1. 📖 Introduction

    Road accidents represent a major problem in Romania, causing a very large number of injuries and deaths every year. The causes of these accidents are varied and include factors such as reckless driving, lack of road maintenance, and poor infrastructure.

    Despite the government's and various organizations' efforts to reduce the number of accidents, the number of deaths and injuries caused by road accidents remains alarmingly high in Romania. For instance, in 2019, the number of deaths caused by road accidents in Romania was 2,813, and the total number of accidents with victims was 11,847.

    Several measures have been proposed and implemented to improve road safety in Romania, including stricter enforcement of traffic laws, improving road design and maintenance, and campaigns to raise public awareness of risks. However, despite these efforts, much remains to be done to address this pressing issue and to keep Romanian citizens safe while driving on the country's roads.

    2. 🎯 Goals

    The objective of this project is to study the road accidents that occurred in Romania during the year 2021 in order to better understand the factors that cause these accidents and what measures the authorities could take to minimize their number.

    ❗We remind that in 2021, Romania had the highest rate of fatalities caused by road accidents of all European countries. [1]

    🔍 For this part of the project, we will focus on the serious accidents that occurred in 2021. These accidents were included in the dataset received from the Romanian Police, which will be detailed in the next section.

    We will try to answer the following questions:

    ❓1. During what part of the day do most serious road accidents occur?

    ❓2. During what part of the week do most serious road accidents occur? How do the accidents that occur during the week (Monday to Friday) differ from those that occur on weekends (Saturday and Sunday)?

    ❓3. What are the characteristics of these serious accidents? What are the factors that influence them?

    ❓4. What are the most dangerous places in Romania?

    3. 💾 The dataset

    The dataset contains 4914 serious road accidents that occurred during the year 2021. The information about these accidents is included in 23 columns as follows:

    • Id: the ID of the road accident

    • Data accident (eng: Accident date): the date and time when the accident occurred

    • Judet (eng: County): the county where the accident occurred

    • In localitate (eng: In locality): whether the accident happened within a locality or outside

    • Localitate (eng: Locality): the name of the locality where the accident occurred

    • Categorie drum (eng: Road category): includes 6 categories: autostrada, drum national, drum judetean, drum comunal, strada si alte drumuri. (engl: highway, national road, county road, communal road, street, and other roads)

    • Denumire drum national (eng National road name): the name of the national road (if the accident occurred on a national road)

    • Caracteristica (eng: Characteristics): the road characteristics where the accident occurred. Includes 7 categories: curba, intersectie, pe pod, trecere CF, sub pod, in tunel (engl: curve, intersection, on a bridge, railway crossing, under a bridge, in a tunnel). If the accident occurred on a road without any specific characteristic, it is listed in the table with the value 'fara' (engl: 'none').

    • Mijloace de semnalizare (eng: Signaling): if the road where the accident occurred had any signaling, it is specified. There are 14 methods of signaling, including: curba cu semnalizare, trecere de pietoni, intersectie semaforizata, trecere CF fara bariera etc. ( engl:curve with signaling, pedestrian crossing, traffic light intersection, railway crossing without barrier, etc).

    • Sens unic (eng: One way street): whether the accident occurred on a one-way street

    • Numar de benzi (eng: Number of lanes): the number of lanes on the road where the accident occurred

    • Latime banda (eng: Lane width): presented in 4 categories:

      • Between 3.25 m and 3.75 m

      • Between 2.75 m and 3.25 m

      • Over 3.75 m

      • Under 2.75 m

    • Drum compozitie (eng: Road composition): indicates the material the road is made of:

      • Asfalt (eng: Asphalt)

      • Piatra (eng: Stone)

      • Pamant (eng: Dirt)

      • Beton (eng: Concrete)

      • Piatra cubica (eng: Cobblestone)

    • Drum stare (eng: Road condition): the condition of the road where the accident occurred

    • Drum aderenta (eng: Road grip): the road grip where the accident occurred. Includes 8 values:

      • Uscat (eng: Dry)

      • Umed (eng: Wet)

      • Alunecos (eng: Slippery)

      • Mazga (eng: Mud)

      • Gheata (eng: Ice)

      • Zapada (eng: Snow)

      • Polei (eng: Black ice)

      • Altele (eng: Other)

    • Cauza principala (eng: Main cause): represents the main cause of the accident. In the dataset, 37 main causes are presented. Some of them are:

      • Driving without a license

      • Excessive speed for road conditions

      • Cyclist violations

      • Driving in the opposite direction

      • Falling asleep while driving

    • Numar vehicule (eng: Number of vehicles: the number of vehicles involved in the road accident

    • Morti (eng: Fatalities): the number of people who died in the road accident

    • Raniti grav (eng: Severely injured): the number of people who were severely injured in the road accident

    • Vreme (eng: Weather): the weather conditions at the time of the accident

    • Luminozitate (eng: Brightness): the brightness of the atmosphere

    • Lat (eng: Latitude): the latitude of the location where the accident occurred

    • Long (eng: Longitude): the longitude of the location where the accident occurred"

    4. 📚 Installation of packages and importing necessary libraries

    # install packages
    !pip install lat-lon-parser
    !pip install folium
    !pip install contextily
    !pip install imblearn
    !pip install colorama
    Hidden output
    # import packages
    import pandas as pd 
    import matplotlib.pyplot as plt
    import seaborn as sns
    import numpy as np
    from statsmodels.tsa.stattools import adfuller
    import contextily as cx
    import folium
    import xyzservices.providers as xyz
    from lat_lon_parser import parse
    from sklearn.preprocessing import OneHotEncoder, LabelEncoder, StandardScaler
    from colorama import Fore
    from colorama import Style

    5. 📕 Importing the dataset

    traffic_accidents = pd.read_csv('data/romanian_accidents.csv')
    traffic_accidents.head()
    traffic_accidents.shape

    The dataset contains 4914 serious accidents that occurred in 2021 on the roads of Romania, and the information about them is included in 23 columns.

    6. 🗃️ Variables used in the analysis

    # color palette used for graphics
    colors = ['#7E1037', '#F55C7A', '#F57C73', '#FFBABA', '#F68C70', '#F6AC69',
              '#F6BC66', "#C89566", '#927071', '#A5888A', '#DAA095', '#D49BA7']