This project is a web-based application designed to explore and analyze road accident data from Poland. The data is sourced from the GUS (Główny Urząd Statystyczny) using their public datasets.
- Source: GUS Database
- Dataset:
Wypadki drogowe i ich ofiary
(Road Accidents and Their Victims) - Data Coverage:
- Road accidents in Poland from 2014 to 2023.
- Includes various accident categories such as vehicle types, causes, and outcomes.
- Build a PostgreSQL database to store and manage road accident data.
- Create a pipeline for cleaning and transforming raw CSV files into structured data.
- Provide an interactive web interface using
Streamlit
for:
- Executing custom SQL queries.
- Generating visualizations to identify trends and patterns in accidents over time and across regions.
- Offer actionable insights through prebuilt dashboards and comparison tools.
- Frontend:
Streamlit
for creating a responsive and interactive web dashboard.
- Backend:
PostgreSQL
for storing and querying data.SQLAlchemy
for ORM and database management.
- Data Processing:
Pandas
for cleaning and preparing the dataset.
- Visualizations:
Plotly
for creating rich, interactive charts and visualizations.
git clone https://github.com/filip-copija/pl_road_accidents
cd pl_road_accidents
# Create a virtual environment
python -m venv venv
# Activate the virtual environment
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
python scripts/load_data.py
streamlit run main.py
Feel free to fork this repository and submit pull requests. Any contributions are welcome!