gabgoh / epcalc

Epidemic Calculator
183 stars 79 forks source link

Integrate Country Specific Real World Data? #1

Open bennomeier opened 4 years ago

bennomeier commented 4 years ago

Hi there Gabgoh,

I haven't used JavaScript in 15 years or so, but I have now created a fork of your repository trying to include the country specific real world data from John Hopkins University in the visualisation.

So far I am able to parse the github data for a specific country / region (the parsing code is in my fork of Chart.svelte). If you also think that this might be an idea worth exploring I would be more than happy to join forces. It may also be a good idea to develop this as a separate project. However, on the chance of being useful I wanted to share the (ongoing) work early.

TomGoBravo commented 4 years ago

Hey Benno, I see you made some progress at https://github.com/bennomeier/epcalc/commits/master Nice! Do you have a link that makes viewing your branch easy?

bennomeier commented 4 years ago

Hi Tom, thanks for your interest! It is very much work in progress, but I have now added a link to the current version to the README. At the moment you have to pass the country and population as a GET argument - here is a link for the US: https://bennomeier.github.io/epcalc/index.html?country=US&logN=19.60 Let me know what you think!

Chubjay commented 4 years ago

`Night Benno, do you have Brazil data ? If so, please send it, ok ?

bennomeier commented 4 years ago

Hi Chubjay, Brazil is listed in the JHU repository: https://github.com/CSSEGISandData/COVID-19/blob/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv

So the country is Brazil, and the natural logarithm of its population is 19.15.

So the link is https://bennomeier.github.io/epcalc/index.html?country=Brazil&logN=19.15

Please be aware that right now the time origin of the simulation and the outbreak in Brazil are shifted. This is a bug and will be fixed tomorrow.

Chubjay commented 4 years ago

Cool ! Thanks 4. Jay

On Thu, Mar 26, 2020 at 6:26 PM Benno Meier notifications@github.com wrote:

Hi Chubjay, Brazil is listed in the JHU repository: https://github.com/CSSEGISandData/COVID-19/blob/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv

So the country is Brazil, and the natural logarithm of its population is 19.15.

So the link is https://bennomeier.github.io/epcalc/index.html?country=Brazil&logN=19.15

Please be aware that right now the time origin of the simulation and the outbreak in Brazil are shifted. This is a bug and will be fixed tomorrow.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gabgoh/epcalc/issues/1#issuecomment-604695359, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILK76CJRGVISLJDZ6CEXKDRJPB67ANCNFSM4LRO6NTQ .

bennomeier commented 4 years ago

Just to follow up on this, there is now a version that shows country specific data, and also lets you pick a strategy among "Observe", "Mitigate", and "Suppress". One sizeable flaw of the whole comparison is that there seems to be no good analogue for "Confirmed Cases" in the simulation - we have therefore opted to show daily new cases, which should roughly resemble "Infected" in the simulation.

For the countries "Brazil", "US", "Iran", "Germany", "Czechia", "France", "Italy" and "Spain", the App is aware of the approximate onset of the epidemic in their country and the population size. So for Brazil the link is now simply https://bennomeier.github.io/epcalc/index.html?country=Brazil

Only one country/region combination is supported so far:

It is straightforward to add more countries to the app - I am happy to do this if people find this useful.

Gabriel, I would be more than happy to issue a pull request, but I can also very much understand if you don't want to mix simulation and real world data.

baobabKoodaa commented 4 years ago

Hey, we integrated Finland specific real world data to our Epidemic Calculator fork here: https://corosim.fi/

I believe this is the most extensive effort of integrating country specific real world data with Epidemic Calculator. We addressed the confirmed case issue described by @bennomeier by creating a parameter slider for "undetected infections", and creating historical estimates for infectious (and other states) by combining confirmed case data with our parameters (with some assumptions inherent to the model).