<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Chisom Chikwendu on Medium]]></title>
        <description><![CDATA[Stories by Chisom Chikwendu on Medium]]></description>
        <link>https://medium.com/@ChisomFavourr?source=rss-55b4da00ae2b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*_HijnM_FjfvZUjvR</url>
            <title>Stories by Chisom Chikwendu on Medium</title>
            <link>https://medium.com/@ChisomFavourr?source=rss-55b4da00ae2b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 15:49:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ChisomFavourr/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Road Accident Analysis]]></title>
            <link>https://medium.com/@ChisomFavourr/road-accident-analysis-3a19f5277fb0?source=rss-55b4da00ae2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a19f5277fb0</guid>
            <dc:creator><![CDATA[Chisom Chikwendu]]></dc:creator>
            <pubDate>Sun, 09 Jul 2023 16:00:24 GMT</pubDate>
            <atom:updated>2023-07-09T16:07:32.871Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NQ1J2q0E49GJq_gJyW9uoA.png" /><figcaption>Interactive Dashboard</figcaption></figure><p><strong>Objective:</strong></p><p>The aim of this project was to analyze road accidents in the UK for the year 2021 and 2022 so as to gain insights into the following requirements:</p><p><strong>Primary KPIs</strong> — Total casualties taken after accidents, total casualties and percentage of total casualties with result to accident severity and maximum casualties by type of vehicle.</p><p><strong>Secondary KPIs</strong> — Total casualties with respect to vehicle type, monthly trend showing the comparison of casualties for the current year and previous year, maximum casualties by road type, distribution of total casualties by road surface, the relation between casualties by area/location and by day/night</p><p><strong>Project Stakeholders:</strong></p><p>This project analysis will particularly be useful for the following stakeholders: the Ministry of Transport, Road Transport Department, Police Force, Emergency Services Department, Road Safety Corps, Transport Operators, Traffic Management Agencies, the Public, and the Media.</p><p><strong>About the dataset:</strong></p><p>The dataset used for this project was gotten from Data Tutorials on <a href="https://youtu.be/XeWfLNe3moM">YouTube</a>, which in turn was obtained from Kaggle. This dataset is not a real-time data, it is a demo data which was used solely for practice purpose.</p><p><strong>Metadata</strong>: The dataset contains 307,974 rows and 21 columns and the file extension is an .xlsx file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RauF-LSVM5F3XLV5wv_bZg.png" /><figcaption>Raw Dataset</figcaption></figure><p>This data analysis project utilized the following steps: Data Cleaning, Data Processing, Data Analysis, Data Visualization and Report/Dashboard.</p><p><strong>STEP 1: DATA CLEANING</strong></p><p>After loading the dataset into Microsoft Excel, I proceeded to duplicate it onto another sheet, which I named “Working Dataset.” The purpose of this duplication was to preserve the integrity of the original data and prevent any irreversible changes.</p><p>During the data cleaning process, I observed that the columns exhibited varying widths and were not adjusted appropriately based on the content within each cell. To fix this, I selected all the cells and double-clicked the black arrow situated at the right border of the first column heading. This action automatically adjusted the column width to accommodate the contents within the cells. I also applied a filter to the column headers. Following the application of the filter, I proceeded to filter each column individually to identify any missing data or typographical errors that required rectification. This step allowed me to meticulously examine and clean the dataset to ensure its accuracy and consistency.</p><p><strong>The Accident Index</strong> — This column serves as the primary key in the dataset, with each entry possessing a unique index number. As a result, it is essential to ensure that there are no duplicate values or blank cells within this column. To verify this, I utilized the filter button to examine all the values within the Accident Index column. Through this process, I confirmed that there were no instances of duplicated values or blank cells.</p><p><strong>Accident Date: </strong>The column for Accident Date only includes dates from 2021 and 2022, which was appropriate for my analysis.</p><p><strong>Days of the Week, Junction Control and Junction Detail</strong>: There were no blank cells or spelling mistakes in these columns.</p><p><strong>Accident Severity</strong>: This column contains four categories of accident severity: Fatal, Fetal, Serious and Slight. However, Fetal is not a valid category as I observed it was a spelling mistake made during data entry. To correct this, I selected the first cell in column F (Accident Severity) and pressed the Ctrl+Shift+down arrow to select the whole column. Then I pressed Ctrl+F to open the Find and Replace dialogue box and replaced “Fetal” with “Fatal”. This resulted in 49 replacements. The accident severities in Column F were corrected to three categories namely: ‘Fatal’, ‘Serious’ and ‘Slight’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CoqcWxIwntJhBhAq1yfyMg.png" /><figcaption>49 Replacements were made</figcaption></figure><p><strong>Carriageway hazards, Road surface conditions and Weather conditions</strong> — I detected that these columns had 3, 1534 and 6057 blank rows respectively, however, I decided not to clean these columns because removing these blank cells could lead to loss of important information or skew the analysis results.</p><p><strong>Other Columns</strong>: I checked the remaining 12 columns namely: latitude, light conditions, Local authority, Longitude, Number of casualties, Number of vehicles, Police force, Road type, Speed limit, Time, Urban or Rural, and Vehicle type and found out there wasn&#39;t a typo error or data cleaning required .</p><p><strong>STEP 2: DATA PROCESSING</strong></p><p>To perform a monthly trend analysis of the casualties for the current and previous year, based on the secondary KPI, I created two customized columns in the dataset: “Month” and “Year”. I used the TEXT function to extract the month and year values from Column B (accident date) into cells C2 and D2 respectively. The formulas I used were (=TEXT B2, “mmm”) for the month and (=TEXT B2, “yyyy”) for the year. I filled the formulas to the entire month and year columns by double-clicking on the auto-fill feature in cells C2 and D2 respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*ri63N3vV7pSc7CrQv32aTg.png" /><figcaption>TEXT Function for the “Month” column</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*0rl4P6UDh3ChS8Oj95KKjg.png" /><figcaption>After auto-filling the month into the entire column</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*hDd650fBuHJszPE1pnlxuA.png" /><figcaption>TEXT Function for “year” column</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*MH0l1J-1MxMS67gNm12O6w.png" /><figcaption>After auto-filling the year into the entire column</figcaption></figure><p><strong>STEP 3: DATA ANALYSIS/DATA VISUALISATION</strong></p><p>I performed these two steps together because I created the charts as I built the pivot tables. To build a pivot table, I selected any cell in the “Working Dataset” and from the Insert tab, I clicked on Pivot table &gt; Table/Range &gt; New Worksheet &gt; Ok. After inserting the Pivot Table, I named the sheet “KPI”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*5GPyCfRKf0ex6KFGrgM3sw.png" /><figcaption>Inserting the Pivot table</figcaption></figure><p>Excel’s pivot tables serve as a powerful data analysis tool capable of various operations such as sorting, grouping, reorganizing, counting, summarizing, averaging, and totalling data from extensive tables. These tables also offer advanced calculation capabilities, allowing for customized report layouts, highlighting crucial information, and incorporating charts and slicers. By leveraging pivot tables, data becomes more manageable, facilitating improved comprehension and reducing complexity. Additionally, pivot tables contribute to time savings and interactivity, enhancing the overall data analysis experience.</p><p><strong>Generating pivot tables and charts for the Primary KPIs:</strong></p><p><strong>Total number of casualties and the total number of casualties with respect to accident severities</strong> — I created these pivot tables to display the sum of all casualties and the sum of casualties with respect to fatal, serious and slight accident severities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*KP0j9_t5ZYxDq6lWtUknSQ.png" /><figcaption>Sum of Number of Casualties and Sum of Number of Casualties by Accident Severity</figcaption></figure><p><strong>Percentage of total casualties with result to accident severity and maximum casualties by type of vehicle</strong></p><ul><li><strong>Fatal Casualty</strong>— I used the GETPIVOTDATA function to extract the number of fatal casualties from the pivot table above. I extracted the total number of fatal casualties into cell E10 with the formula =GETPIVOTDATA(“Number_of_Casualties”,$A$9,”Accident_Severity”,”Fatal”). I also extracted the total number of non-fatal casualties (i.e., serious and slight casualties) into cell E11 using the formula =GETPIVOTDATA(“Number_of_Casualties”,$A$9,”Accident_Severity”,”Serious”)+GETPIVOTDATA(“Number_of_Casualties”,$A$9,”Accident_Severity”,”Slight”). I named this category “Other”. To get the maximum number of fatal casualties, I divided the number of fatal casualties (E10) by the sum of fatal casualties (E10) and others (E11) in cell F10 using the formula =E10/($E$10+$E$11) and converted the value to a percentage. To find the maximum number of non-fatal casualties, I divided “others”(E11) by the sum of fatal casualties (E10) and “other”(E11) in cell F11 using the formula =E11/($E$10+$E$11) and converted the value to a percentage.</li></ul><p>NB: The sum of fatal casualties (E10) and “other” (E11) is also the sum of all three casualties.</p><ul><li><strong>Serious and Slight accident casualties</strong> — I applied the same method to calculate the serious and slight accident severities.</li></ul><p>I utilized doughnut charts to visualize the percentage of fatal, serious and slight accident casualties.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uyUYGWcdVtZUUNxJzepWwA.png" /><figcaption>Fatal, Serious and Slight accident severity distributions with respective doughnut charts</figcaption></figure><p><strong>SECONDARY KPIs</strong></p><p><strong>Total casualties with respect to vehicle type</strong> — I created a pivot table to display the sum of number of casualties by vehicle type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*dxlU9MF-6TuCnA6Enu0I0w.png" /><figcaption>Sum of road accident with respect to vehicle type</figcaption></figure><p>I applied the <strong>calculated items</strong> in pivot table to group similar vehicle classes, such as car and taxi/hire car, motorcycle 125cc, motorcycle 50cc, motorcycle over 125cc and motorcycle over 500cc, bus and minibus etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*8GQHOMrjuVtyZRLObNBA2Q.png" /><figcaption>Combining similar vehicle types using the Calculated Item feature in Pivot table</figcaption></figure><p>After combining all similar vehicle types, I had 6 vehicle types namely, agricultural vehicle, cars, bus, van, bike and others</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*qVaqsSOipePcpqZFdFdzyg.png" /><figcaption>Six vehicle types</figcaption></figure><p>I also created a pivot table for car casualties where I used the GETPIVOTDATA function to extract the number of car casualties from the pivot table above. I extracted the total number of car casualties into cell I26 using the formula: =GETPIVOTDATA(“Number_of_Casualties”,$A$25,”Vehicle_Type”,”Cars”). I also extracted the total number of non-car casualties (agricultural vehicle, bus, van, bike and others) into cell I27 with the formula: =GETPIVOTDATA(“Number_of_Casualties”,$A$25,”Vehicle_Type”,”Agricultural vehicle”)+GETPIVOTDATA(“Number_of_Casualties”,$A$25,”Vehicle_Type”,”Bus”)+GETPIVOTDATA(“Number_of_Casualties”,$A$25,”Vehicle_Type”,”Van”)+GETPIVOTDATA(“Number_of_Casualties”,$A$25,”Vehicle_Type”,”Bike”)+GETPIVOTDATA(“Number_of_Casualties”,$A$25,”Vehicle_Type”,”Others”) and named this category “Others”. After this, I calculated the percentage of <strong>car casualties</strong> with the formula =I26/($I$26+$I$27) and calculated the percentage of “O<strong>thers” </strong>with the formula <strong>= </strong>I27/($I$26+$I$27). I converted the values to percentages and visualized the percentage using a doughnut chart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fu-YLkZNRttV7V_t_s6yNQ.png" /><figcaption>Car casualties distribution and visualization</figcaption></figure><p><strong>Monthly comparison of casualties for the year 2021 and 2022</strong> — I used a pivot table to display the monthly comparison of casualties for the year 2021 and 2022. To make a combo chart, I copied and pasted the values for both years outside the pivot table. Then I applied these values to generate a combo chart.</p><p>PS: To create a combo chart, which is a type of PivotChart that displays two chart types on the same chart, you need to extract the values outside the pivot table first. This is because the combo chart needs to access the values directly from the worksheet, not from the pivot table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9AcgVmnA9RLcCY8Qc8mVIw.png" /></figure><p><strong>Maximum casualties by road type —</strong>I created a new worksheet named “Road type” where I displayed the maximum casualties by road type in a pivot table. I formatted the values to show thousands with a “K” suffix by selecting the values, pressing Ctrl+1 and choosing a custom number format (0.0, “K’). Then I generated a bar chart to visualize these values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*xSNoqgkuQdtnHE02bMeJEA.png" /><figcaption>Customized number category</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MdtzUc3Qdc3Yh0l1RcPJIg.png" /><figcaption>Pivot table for sum of casualties by road type and visualization</figcaption></figure><p><strong>Distribution of total casualties by road surface — </strong>To analyze the total number of casualties based on road surface conditions, I utilized a pivot table. By leveraging the “calculated item” feature in Pivot table Analyze section, I grouped the road surfaces into categories such as Dry, blank (indicating missing data), Wet, and Snow/Ice. To generate a tree map visualization, I extracted the values from the pivot table, enabling me to represent the data in a visually informative manner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gtxl5AHyr7VQOikiRYXf0A.png" /></figure><p><strong>Casualties by area/location and by day/night — </strong>In another sheet titled “doughnut chart”, I created a pivot table to display the number of casualties by location and light conditions. I converted the values using the customized number category (0.0, “K”) and visualized them using doughnut charts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H9gGVx6cnepyS_QZCZWfIA.png" /></figure><p><strong>STEP 4: DASHBOARD CREATION — </strong>I created a dedicated sheet called “Dashboard” where I extracted the KPI values (total casualties, fatal, serious, slight casualties, car casualties, etc) into my dashboard. To personalize the dashboard’s appearance, I customized the font, size, and colors of its elements according to my preferences.</p><p>Please note that to extract values from the pivot table into the dashboard, it is necessary to copy and paste them outside the pivot table first. Failure to do so will prevent the dashboard from accessing the values stored in the pivot table.</p><p>To enhance the interactive nature of the dashboard, I implemented a timeline functionality, allowing effortless navigation across different time periods such as years, months, and quarters. Furthermore, I integrated a slicer that simplifies the selection of specific localities, including urban and rural areas. To optimize the dashboard’s overall functionality, both the slicer and timeline were interconnected with all the sheets in the dashboard. On the leftmost section of the dashboard, I integrated interactive tools that provide diverse functionalities. These tools enable users to access an analysis sheet, presenting the comprehensive results of my calculations and analyses. Additionally, I included an email link for individuals who wish to contact me, as well as a separate hyperlink directing users to the Wikipedia page containing road accident data. Additionally, I developed a data analysis sheet where I meticulously documented all the calculations performed during the project. This sheet serves as a comprehensive record of the extensive analyses conducted as part of the project.</p><p>To explore the full interactivity of my dashboard, kindly click on this <a href="https://1drv.ms/x/s!AqR50GXJxoVign2y_3FLqPNbcfNh?e=Vxe5Ch">link</a>. Kindly leave a like, follow or comment. Also, let’s connect on <a href="https://twitter.com/ChisomFavourr">Twitter</a>, <a href="https://www.linkedin.com/in/chisomchikwendu">LinkedIn</a> as I navigate my data analytics journey.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a19f5277fb0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>