This repository aims to analyze traffic accident data using Python and various data science tools. The project includes a Docker setup to ensure a consistent development environment with all necessary dependencies.
- Conda: Used to manage dependencies and create isolated environments.
- Docker: Ensures a consistent and reproducible environment for development and deployment.
- Orange3: A comprehensive suite for machine learning and data mining.
- Python: The main programming language used for data analysis and processing.
Ensure you have Docker and Docker Compose installed on your system.
To install Docker and Docker Compose, follow these steps:
-
Install Docker:
sudo apt-get update sudo apt-get install -y docker-ce docker-ce-cli containerd.io
-
Start the Docker Container:
docker compose -f docker/docker-compose.dev.yml up -d
-
Allow X11 connections: Allow X11 connections:
xhost +local:docker
-
Access the Container: To access the container in interactive mode, run:
docker compose -f docker/docker-compose.dev.yml exec traffic-analysis bash
-
Initialize Conda and Activate the Environment: Inside the container, initialize Conda and activate the environment:
source /opt/conda/etc/profile.d/conda.sh conda activate traffic_analysis
-
Start Orange: Once the environment is activated, start Orange with:
orange-canvas
Dependencies are managed via Conda and are specified in the deploy/requirements.txt file. Key dependencies include:
- Orange3: A comprehensive suite for machine learning and data mining.
setup.py
: Configuration for the Python package, including project metadata and dependencies.
docker/Dockerfile.dev
: Defines the Docker image for the development environment, based on Miniconda.docker/docker-compose.dev.yml
: Docker Compose configuration for setting up the development environment.