Skip to content

NLaureano/GlobalInfectionSimulator

Repository files navigation

Global Infection Simulator

Built for the Winter 2025 University of Oregon Hackathon AKA Quackhacks

An interactive visualization tool that simulates the spread of infection across different countries, taking into account various factors such as Human Development Index (HDI) and country interconnections.

Screen Shot 2025-01-19 at 11 19 32 AM

Features

  • Interactive World Map: Click on countries to select infection starting points
  • Real-time Visualization: Watch as the infection spreads across countries
  • Country-specific Modeling: Uses real-world data including:
    • Population data
    • Human Development Index (HDI)
    • Geographic borders and connections

Components

main.py

The main GUI application that provides:

  • World map visualization
  • Country selection interface
  • Simulation controls
  • Real-time statistics

Controls:

  1. Virulence: Adjust the infection spread rate (0-100%)
  2. Starting Country: Click to select the initial infection point
  3. Start/Step: Control simulation progression
  4. Reset: Clear all infections and start over
  5. Total Infected: View current infection statistics

infectionSimulator.py

The core simulation engine that handles:

  • Infection spread calculations
  • Country response modeling
  • Population dynamics
  • Geographic spread patterns

Features:

  • HDI-based country response simulation
  • Realistic spread patterns based on country connections
  • Population-aware infection modeling

How to Use

  1. Setup:

    python3 run.py
  2. Start Simulation:

    • Adjust virulence using the slider
    • Click "Starting Country" button
    • Select a country on the map
    • Use "Start/Step" to begin simulation
  3. Monitor Progress:

    • Red areas indicate infected regions
    • Check statistics for detailed infection counts
    • Use reset to start a new simulation

Requirements

  • Python 3.x
  • tkinter
  • PIL (Python Imaging Library)
  • numpy

Data Sources

  • Country borders data (borders.py)
  • Population and HDI data (datasets/seed.json)
  • World map image (world.png)

Implementation Details

Infection Spread Model

  • Uses probabilistic modeling based on virulence
  • Considers country HDI for response effectiveness
  • Accounts for geographic proximity and connections

Visualization

  • Grid-based country representation
  • Color intensity indicates infection severity
  • Real-time updates during simulation

Resources

About

Quackhacks Project W25

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages