trekhleb / covid-19 Goto Github PK
View Code? Open in Web Editor NEW📈 Coronavirus (COVID-19) dashboard to show the dynamics of Сoronavirus distribution per country
Home Page: https://trekhleb.dev/covid-19/
📈 Coronavirus (COVID-19) dashboard to show the dynamics of Сoronavirus distribution per country
Home Page: https://trekhleb.dev/covid-19/
Since the start dates of the infection is in most countries are different will it be possible to add a date for start selectable ?
That would make the analysis more friendly and conclusive.
Eventually a date for end would be a win too.
IGNORE
First, thanks for this, this is very useful.
The graphs for "confirmed", "deaths" and "recovered" are always yellow, red and green. This gets a bit confusing once you want to compare several countries.
I'm sure you've thought about this problem already. Maybe generate different shadings per country?
Thank you for considering!
First of all, congratulations for the dashboard, I really liked it!
There is a problem that I noticed and that has been very common in the covid-19 dashboards, a misinterpretation of the concept of mortality. Mortality is a measure of the number of deaths (usually or due to a specific cause) in a population scaled to the size of that population per unit of time. The correct name of the metric being represented by this dashboard is lethality.
I know it's Confirmed-Recovered, but it would be nice to see Active cases on the graph.
Thanks.
To the right of the data rows, could we add a row to estimate the mortality rate? It would be interesting to see how that coincides based on other reports and by country and globally.
Probably just in a format like deaths/confirmed=%
or would it be deaths/(confirmed - recovered)=%
?
typing ie /
or +
into the 'Search country' field crashes the app
problem occurs @ index.js:372 new RegExp(countrySearchQuery.trim(), 'i')
Steps to reproduce:
I haven't been able to find any other sub-national regions (Chinese provinces, US states, etc) that cause this issue. Just Canadian provinces so far.
Console output:
Uncaught TypeError: Cannot read property 'length' of undefined
at data.js:204
at Array.reduce (<anonymous>)
at getTotalCount (data.js:202)
at DataType (index.js:196)
at renderWithHooks (react-dom.development.js:14938)
at updateFunctionComponent (react-dom.development.js:17169)
at beginWork (react-dom.development.js:18745)
at HTMLUnknownElement.callCallback (react-dom.development.js:182)
at Object.invokeGuardedCallbackDev (react-dom.development.js:231)
at invokeGuardedCallback (react-dom.development.js:286)
(anonymous) @ data.js:204
getTotalCount @ data.js:202
DataType @ index.js:196
renderWithHooks @ react-dom.development.js:14938
updateFunctionComponent @ react-dom.development.js:17169
beginWork @ react-dom.development.js:18745
callCallback @ react-dom.development.js:182
invokeGuardedCallbackDev @ react-dom.development.js:231
invokeGuardedCallback @ react-dom.development.js:286
beginWork$1 @ react-dom.development.js:23338
performUnitOfWork @ react-dom.development.js:22289
workLoopSync @ react-dom.development.js:22265
performSyncWorkOnRoot @ react-dom.development.js:21891
(anonymous) @ react-dom.development.js:11224
unstable_runWithPriority @ react.development.js:2685
runWithPriority$1 @ react-dom.development.js:11174
flushSyncCallbackQueueImpl @ react-dom.development.js:11219
flushSyncCallbackQueue @ react-dom.development.js:11207
flushPendingDiscreteUpdates @ react-dom.development.js:21982
flushDiscreteUpdates @ react-dom.development.js:21962
finishEventHandler @ react-dom.development.js:761
batchedEventUpdates @ react-dom.development.js:795
dispatchEventForLegacyPluginEventSystem @ react-dom.development.js:3691
attemptToDispatchEvent @ react-dom.development.js:4390
dispatchEvent @ react-dom.development.js:4312
unstable_runWithPriority @ react.development.js:2685
runWithPriority$1 @ react-dom.development.js:11174
discreteUpdates$1 @ react-dom.development.js:22022
discreteUpdates @ react-dom.development.js:803
dispatchDiscreteEvent @ react-dom.development.js:4291
react_devtools_backend.js:6
The above error occurred in the <DataType> component:
in DataType (created by DataTypes)
in form (created by DataTypes)
in DataTypes (created by App)
in div (created by App)
in div (created by App)
in App
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
When many countries are selected then country labels shrink the chart to the point when it is invisible
Firstly, great work, thanks.
I would be interested in seeing correlations. The user could select two attributes such as total cases and population density. This dataset here looks interesting for metainformation about countries. -> https://www.kaggle.com/sudalairajkumar/undata-country-profiles
Cheers
Milan
Make an option to get chart to show from the start showing a country ex: "USA"
Hello! Color on graph and "Last update" should be the same?
Even more than the absolute number it would be useful to see the new cases / recoveries / deaths per day.
I might find some time to work on this on the following days.
This would require some assumptions about case fatality rate and average time from infection to case resolution. A good starting point might be 1% CFR, 1 week from infection to confirmation, 2 weeks from confirmation to resolution - ie estimated infections 21 days ago = deaths today * 100. Maybe we could also provide sliders to see how those assumptions impact the graph.
According to this comment from indykpol:
"...you are actually log-transforming the values, and not using the log scale. In log scale, the values are spaced according to the logarithm, however they are still the original values. Read on the different approaches here: https://people.umass.edu/whopper/posts/log_scales_ggplot/
Your solution loses interpretability."
According to the comment from Thomas Soos here: https://dev.to/thomassalty/comment/n59a
There's one thing I always think about seeing these numbers which is the percentage of cases according to the population of the countries. Because let's say 80.000 cases in China is very different from 80.000 cases in Italy, whose population is much, much less. So in my opinion, it would be a nice addition to see the percentages in the Bootstrap Table in a new column.
Since we're comparing countries of vastly different sizes, per capita figures can be much more informative. By pulling the population data from the UN or elsewhere we could provide:
I'm not sure if this is possible, since they might only have testing data for the US, but it would be very nice to be able to see how many people have been tested and what percentage tested positive/negative as seen here: https://covidtracking.com/data/
They do appear to have an API.
Some countries have a delay in infection, an option to make possible to choose the start date is very important to demonstrate the proportion of numbers.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.