Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/filip-copija/roadaccidentsexplorer
Interactive dashboard for exploring and analyzing road accident data in Poland. Built with Streamlit, PostgreSQL, and Python for dynamic SQL queries, visualizations, and insights.
https://github.com/filip-copija/roadaccidentsexplorer
data-dashboard data-visualization poland postgresql python road-accidents streamlit
Last synced: 17 days ago
JSON representation
Interactive dashboard for exploring and analyzing road accident data in Poland. Built with Streamlit, PostgreSQL, and Python for dynamic SQL queries, visualizations, and insights.
- Host: GitHub
- URL: https://github.com/filip-copija/roadaccidentsexplorer
- Owner: filip-copija
- Created: 2024-11-17T21:35:57.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-09T20:24:52.000Z (24 days ago)
- Last Synced: 2024-12-09T20:45:26.184Z (24 days ago)
- Topics: data-dashboard, data-visualization, poland, postgresql, python, road-accidents, streamlit
- Language: Jupyter Notebook
- Homepage:
- Size: 2.96 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Road Accidents Database Explorer ๐ฆ
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.
---
## ๐ Dataset Information
- **Source**: [GUS Database](https://bdl.stat.gov.pl/bdl/start)
- **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.---
## ๐ฏ Project Goals
1. Build a PostgreSQL database to store and manage road accident data.
2. Create a pipeline for cleaning and transforming raw CSV files into structured data.
3. 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.
4. Offer actionable insights through prebuilt dashboards and comparison tools.---
## ๐ ๏ธ Technologies Used
- **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.---
## ๐๏ธ Database Schema
![image](https://github.com/user-attachments/assets/1971f806-50ac-43bd-ad2c-6f9590a8f69e)---
## ๐ How to Set Up the Project
### 1. Clone the Repository
```bash
git clone https://github.com/filip-copija/pl_road_accidents
cd pl_road_accidents
```
### 2. Set Up the Python Environment
```bash
# 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
```
### 3. Configure `.env` Variable
### 4. Set Up the Database (sql ๐)
### 5. Run Data Loading Script
```bash
python scripts/load_data.py
```
### 6. Run streamlit webb application
```bash
streamlit run main.py
```---
## ๐ค Contributions
Feel free to fork this repository and submit pull requests. Any contributions are welcome!