This project is an investigation into traffic accidents in Barranquilla, Colombia, with the aim of developing predictive models to identify accident hotspots and contributing factors. By analyzing a dataset of 25,610 accident records, this research seeks to provide insights that can guide urban planning and road safety interventions.
The project is organized as a Quarto website, with the following structure:
accident-prediction/
├── introduction.qmd
├── data-exploration.qmd
├── methodology.qmd
├── results.qmd
├── conclusion.qmd
└── _quarto.yml
- introduction.qmd: Provides an introduction to the study, including background, justification, and model selection.
- data-exploration.qmd: Contains an initial exploration of the dataset, including summary statistics and visualizations.
- methodology.qmd: Describes the methodology used, including data cleaning, feature engineering, and model selection.
- results.qmd: Presents the results of the predictive modeling, including performance metrics and key findings.
- conclusion.qmd: Concludes the study with a summary of findings and implications for road safety.
- _quarto.yml: Configuration file for the Quarto website.
The dataset used in this study contains 25,610 records of traffic accidents in Barranquilla, with the following columns:
FECHA_ACCIDENTE
: Date of the accidentHORA_ACCIDENTE
: Time of the accidentGRAVEDAD_ACCIDENTE
: Severity of the accidentCLASE_ACCIDENTE
: Type of accidentSITIO_EXACTO_ACCIDENTE
: Exact location of the accidentCANT_HERIDOS_EN_SITIO_ACCIDENTE
: Number of injured at the accident siteCANT_MUERTOS_EN_SITIO_ACCIDENTE
: Number of fatalities at the accident siteCANTIDAD_ACCIDENTES
: Number of accidentsAÑO_ACCIDENTE
: Year of the accidentMES_ACCIDENTE
: Month of the accidentDIA_ACCIDENTE
: Day of the week of the accident
The primary model used in this study is Random Forests, chosen for its balance between predictive accuracy and interpretability. This model is well-suited for handling complex datasets and has been effectively used in similar traffic accident prediction studies.
To build and view the Quarto website locally:
-
Clone the repository:
git clone https://github.com/neisser/baqapp.git
-
Navigate to the project directory:
cd baqapp
-
Install Quarto (if not already installed). Instructions can be found here.
-
Preview the website locally:
quarto preview
-
The website will be available at
http://localhost:4321
.
This project is licensed under the MIT License - see the LICENSE file for details.
Special thanks to the contributors of the dataset and the academic community whose research informed this project.