Authors

Inspiration

Inspired by the recent global crisis around COVID-19 and the subsequent measures introduced to slow its spread, we wanted to create a tool to help people understand how epidemics spread and what factors, such as social distancing and travel, influence the final outcome. The website can be visited at this link: https://jackliu612.github.io/HooHacks-2020/

What it does

This simulation runs based on the SIR epidemic model where the population is categorized as either susceptible, infected, or removed. We modified this slightly to account for infected individuals who display no symptoms (carriers) as well as those who have unfortunately succumbed to the disease. The simulation involves 6 communities with individuals represented as dots and the quantity of each type of individual graphed over time. In the beginning, there is a single infected individual and each person is moving randomly. As the simulation progresses, the virus will spread to those nearby, following an exponential growth pattern that is modeled by a graph. The user can choose to change variables such as transmission radius, lethality factor, or social distancing participation to see their influence on transmission. We hope to show users the impacts of protective measures on 'flattening the curve' of viral spread.

How we built it

The simulation graphics were rendered using the p5.js library and all simulation logic was written using javascript. The live updating chart was created using chart.js. The site was created using bootstrap on top of standard HTML and CSS.

Challenges we ran into

Working with the drawing canvas and positioning each of the elements on the screen while maintaining a clean look was one of our biggest challenges. Also, making all of the sliders function with the code especially with some of the parameters changing mid-simulation was difficult.

Accomplishments that we're proud of

We're proud of the results generated from our simulation. Our control parameters created a graph that looks very similar to graphs created using similar models for epidemics and helps add validity to our project. We're also proud of adding customization to almost all of the parameters fo the simulation so that the user is better able to see how each part factors into the overall system.

What we learned

We learned a lot of javascript through this project as well as some optimization techniques. Many times during the project the framerate of the website would be very slow because of all the calculations occurring each frame and we learned through fixing these issues.

What's next for Epidemic Simulator

In the future, we'd like to add additional features to the simulator such as central locations individuals commonly go to and quarantines. Saving and loading data would also make comparisons across runs easier. Finally, we would ideally also like to link to other sources so users can learn more about epidemics.

Try It out

Hackathons

Technologies

bootstrap, chart.js, css, html, javascript, p5.js

Devpost Software Identifier

256375