DerSticher / Covid19-Chart

A simple page for visualisation of covid19 development per country
MIT License
8 stars 4 forks source link

per capita option #3

Open FlorinAndrei opened 4 years ago

FlorinAndrei commented 4 years ago

You know what would be cool? An option to switch between absolute numbers and per capita numbers - ratios of absolute numbers divided by the total population.

I would help with this, but I have absolutely no time. So just throwing the idea out there.

Thanks!

DerSticher commented 4 years ago

In general, a good idea that I have also thought about. I'm still working on adding a second page for country comparison, but unfortunately I also don't have too much time right now.

My biggest open question for this is where to get reliable data for all the countries automatically. I worry that someone would have to collect all the numbers by hand to connect them to the country names correctly. The dataset recently changed the country naming a bit, and might do so in the future again, which then would mess things up again.

FlorinAndrei commented 4 years ago

I would say - get it once, for any year in the last decade, then leave it alone. Embed it in the code. Should be good enough. Even something like this should work (maybe via a web scraper - I would use beautifulsoup in Python):

https://en.wikipedia.org/wiki/List_of_countries_by_population_(United_Nations)

The biggest issue, as you've said, is stitching the names together between the two lists.

SandyBathwater commented 4 years ago

Nice simple display, I like it.

That would be cool info to get an api for, you would think it already exists.. maybe ill look. (re: api to get population for a given region or even an arbitrary polygon. I'll get right on that.

I had a similar idea as @DerSticher but kinda fell off the project as I got busy on others. http://24.19.223.37:1337/covid19 - with several charts.

I still have to format and pull in the US data and "simulate" the "recoveries" to plot the "curve" more "accurately" I proved in in excel yesterday but haven't gotten the idea put into javascript yet.

Recovery simulate: just subtract 20 day old numbers from current numbers, by then everyone has resolved their case in one of two ways.