This repository contains the work of Team 4 for the AI Hackathon in Transport 2024. Our project focuses on analysing accident data in Greater Manchester from 2010 to 2021 and developing tools to provide insights to citizens and policymakers.
unified_dataset.csv
- Contains unified datasets of accidents, casualties and vehicles in Greater Manchester from 2010-2021
- Combines and cleans the raw accident, casualty and vehicle CSV files
- Use this as the master dataset for all subsequent analysis and visualisation
- The Jupyter Notebook for creating a unified dataset is here.
-
manchester_accident_severity1_heatmap.ipynb
- Jupyter Notebook generates an interactive heatmap of the severity of one accident in Greater Manchester
-
manchester_accident_analysis.ipynb
- The Jupyter Notebook perform an in-depth analysis of the unified accident dataset.
- Generates insights such as clusters of top high-risk areas and top contributing factors.
-
manchester_intelligent_road_safety_hub.py
- Code for an interactive web portal presenting accident insights to citizens and policymakers
- Built using Gradio for the frontend interface
- Leverages the OpenAI API to power a simple chatbot that can answer questions about Manchester accidents
- Potential Question: What are the top three reasons for accidents in Greater Manchester with an explanation?
- Clone this repository and navigate to the project directory
- Run the Jupyter notebooks in sequential order to generate the unified dataset, generate heatmap and perform analysis
- Install the required Python libraries:
pip install -r requirements.txt
- Set the environment variable OPENAI_API_KEY in the current shell session:
export OPENAI_API_KEY="your_openai_api_key"
- Launch the interactive portal by running:
python3 manchester_intelligent_road_safety_hub.py
Ada x Amine x Harry x Finbarrs x Jill x Jamie x Hakem
Thank you to our Department for Transport (DfT), Google and PA colleagues.
This project is licensed under the MIT License.
(c) 2024 DfT - Department for Transport.