Coder Social home page Coder Social logo

lucadiba / epidemic-simulator Goto Github PK

View Code? Open in Web Editor NEW
23.0 4.0 5.0 515 KB

A HTML/JavaScript simulator for an epidemc on a population

Home Page: https://epidemic.lucadibattista.it/

License: GNU General Public License v3.0

HTML 28.43% JavaScript 71.57%
epidemic epidemic-simulations coronavirus covid-19 sars-cov-2 simulator

epidemic-simulator's People

Contributors

anapdinizm avatar lucadiba avatar sevhub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

epidemic-simulator's Issues

Quarantine feature

Send people in quarantine after x days, with a probability p.

Real world:

  • x: days before symphtoms
  • p: 1 - P[not showing symphtoms]

Unit testing

Add unit testing for:

  • Start simulation button
  • Stop simulation button
  • Parameters input change

Add known viruses predefined settings

Add names of the most known viruses.
When a virus is selected, the parameters will be replaced with the ones of the virus.

Create JSON files with values for:

  • SARS-CoV-2, no lockdown
  • SARS-CoV-2, lockdown

Then:

  • Implement the feature

Dark mode

Add dark mode for:

  • Bootstrap theme
  • Simulation canvas
  • Chart

[Edge Legacy] SCRIPT1005: Expected '('

Summary:
The page loads but the simulation won't start because an error is raised on page load.

Steps to reproduce:
Just load the page.

Error:
SCRIPT1005: SCRIPT1005: Expected '('

Where:
index.js (29,11)

Code raising the error:
getId = function () {

More informations
Microsoft Edge 44.18362.449.0
Microsoft EdgeHTML 18.18362

Intensive care constraint

A percentage of the infected will need intensive care.
If the number of people in the intensive care has reached a maximum value, everyone else will die due to a lack of care.

Steps:

  • add intensive care constraint in form
  • add "hospital" (canvas for intensive care)
  • add currently in intensive care on the graph
  • add a horizontal line in the chart for the maximum availability.

Add legend for colors

There already is the legend of the chart.
See if it's better to add another legend for dots.

Maximum total population

Add a check for the input control_initial_population.
When the number is too high, the tab will crash.

Possible solution: if 6.000.000 is set, the simulation will run with 1.000 people but the numbers will be scaled to 6.000.000.

Multi-language

  • Multi-language feature
    Languages:
  • English
  • Italian
  • Dutch

To contribuite, please see the file src/plugins/translator/translator.js.

Pause button

Add a button for pausing the simulation.

  • Pause all the timers
  • Dots speed = 0

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.