Git Product home page Git Product logo

victormhp / epidemics-simulations Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 551 KB

Web application designed to produce informative charts that illustrate epidemics on networks. These charts are generated with D3 using data generated with the EoN Python library.

License: GNU General Public License v3.0

Python 14.02% JavaScript 5.05% HTML 0.66% Svelte 54.25% TypeScript 21.63% CSS 4.13% Shell 0.25%
d3 eon flask networks svelte

epidemics-simulations's Introduction

Epidemics Simulations

Epidemics Simulations is a web application that allows you to create and visualize epidemics on networks. The application is built using Svelte for the frontend and Flask as the backend web server.

Requirements

Ensure you have the following prerequisites installed on your system:

  • Python 3.9 - 3.10
  • pnpm
  • Chromium (Only for desktop app)

Installation

Clone the repository and navigate to the directory

git clone https://github.com/victormhp/epidemics-simulations.git
cd epidemics-simulations.git

Option 1: Manually

# Install and build frontend
cd ./client/
pnpm install
pnpm run build


# Create and activate venv
cd ./server/
python3 -m venv venv
source ./venv/bin/activate

# Install python libraries
pip install -r requirements.txt

Run the flask server for developement

python index.py

Run for production with gunicorn

gunicorn --bind 0.0.0.0:8997 --timeout 600 wsgi:app

Option 2: Docker

For a convenient and containerized deployment, you can use Docker.

Build docker image for the API

docker build -f Dockerfile.api -t eon-api .

Build docker image for the client and the nginx server

docker build -f Dockerfile.client -t eon-client .

Run docker compose to orchestrate the containers

docker compose up

Desktop App

To run the desktop app, it will be built using FlaskWebGui. Please ensure that Google Chrome or Chromium is installed on your system.

python desktop.py

Executable for Desktop App

To create an executable for the desktop app, we utilize PyInstaller. You have two options to build the app:

chmod +x desktop.sh
./desktop.sh

Note: In the --add-data argument the path separator is platform specific, os.pathsep (which is ; on Windows and : on most unix systems) is used.

Run the app

./app/dist/epidemics

EoN Module

The simulations are made possible by EoN, a Python package designed for simulating epidemics on networks and solving Ordinary Differential Equation (ODE) models of disease spread.

For more details on using the EoN module, refer to the Epidemics on Networks Documenation. It provides comprehensive information on utilizing the EoN package.

epidemics-simulations's People

Contributors

victormhp avatar

Stargazers

Victor Alberto avatar

Watchers

 avatar

epidemics-simulations's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.