{"id":226,"date":"2020-02-18T17:00:44","date_gmt":"2020-02-18T17:00:44","guid":{"rendered":"https:\/\/light-and-code.com\/?p=226"},"modified":"2020-02-18T17:01:37","modified_gmt":"2020-02-18T17:01:37","slug":"modeling-the-spread-of-the-corona-virus","status":"publish","type":"post","link":"https:\/\/light-and-code.com\/?p=226","title":{"rendered":"Modeling the spread of the Corona Virus"},"content":{"rendered":"\n<p>I recently posted <a href=\"https:\/\/light-and-code.com\/?p=39\">an article outlining<\/a> a method called SIR-networks and an implementation in Matlab. It was originally a task at the university I teach at and I wanted to react to the recent Dengue-Fever outbreak in Jemen.<\/p>\n\n\n\n<p>Since then, the Coronavirus has created a lot of fear around the world, a giant wave of infections and several thousand deaths at the time of writing this article. So when I had time on my hands during two 4 hour train rides recently, I decided to port that system to a more accessible platform. More details will be provided shortly and I will continue work on the system in the next days, but as it stands, <a href=\"https:\/\/light-and-code.com\/CoronaVirus\/index.html\">this is a tool to model the spread of infectious diseases<\/a>.<\/p>\n\n\n\n<p>Some details on the controls: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Beta is the average number of likely interactions times the probability of infection per time step. So if the time step is one day, every person meets 4 people per day and the likelihood of infection is 50% (0.5) then beta would be 2 ( 1 * 4 * 0.5 = 2)<\/li><li>Gamma is the inverse of the number of time steps it takes to recover. So if it takes 4 timesteps to recover, gamma is 0.25.<\/li><li>The time step length is measured in days. <\/li><li>The total length of the simulation is also measured in days.<\/li><li>The mortality describes what fraction of &#8220;recovered&#8221; people are dead in this model. So if out of 100 infected people one person dies, this value is 0.01.<\/li><li>The starting point are currently 1000 infected people in China on day 0.<\/li><\/ul>\n\n\n\n<p>To use the tool, you first have to click &#8220;Run simulation&#8221; or adapt the values above that and then click it. After the run is complete, you can either visualize the result on the world map by clicking &#8220;Visualize&#8221; or select countries and target groups in the three chart elements and visualize the outcome as line plots.<\/p>\n\n\n\n<p>The code for this website is available in my <a href=\"https:\/\/github.com\/SilverLinings89\/VirusSimulator\">Github account<\/a>. I will update it as soon as I have time to make it more readable and extend its functionality.<\/p>\n\n\n\n<p>Known bugs:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>There are some countries especially in Africa that are currently not part of the model. This is due to a backend issue.<\/li><li>It is hard to tell when the computation is done.<\/li><li>The traffic model is based on air-transport and that model is not optimal.<\/li><li>Countermeasures by governments are not currently being considered.<\/li><li>Land and Sea travel is not part of the simulation.<\/li><\/ul>\n\n\n\n<p>I will write more articles in the next days outlining the development and status of this project and introducing you to ways of also developing solutions for complex problems in a few hours or days. Until then I would be happy about your comments.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"tmnf_excerpt\"><p>I recently posted an article outlining a method called SIR-networks and an implementation in Matlab. It was originally a task at the university I teach at and I wanted to react to the recent Dengue-Fever outbreak in Jemen.<\/p>\n<\/div>","protected":false},"author":1,"featured_media":225,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[34,2],"tags":[],"class_list":["post-226","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-highlights","category-math"],"jetpack_featured_media_url":"https:\/\/light-and-code.com\/wp-content\/uploads\/2020\/02\/coronavirus-4810201_1280.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/light-and-code.com\/index.php?rest_route=\/wp\/v2\/posts\/226","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/light-and-code.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/light-and-code.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/light-and-code.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/light-and-code.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=226"}],"version-history":[{"count":2,"href":"https:\/\/light-and-code.com\/index.php?rest_route=\/wp\/v2\/posts\/226\/revisions"}],"predecessor-version":[{"id":228,"href":"https:\/\/light-and-code.com\/index.php?rest_route=\/wp\/v2\/posts\/226\/revisions\/228"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/light-and-code.com\/index.php?rest_route=\/wp\/v2\/media\/225"}],"wp:attachment":[{"href":"https:\/\/light-and-code.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/light-and-code.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/light-and-code.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}