DB structure COVID 19 #107
Comments
|
hi @DataEnthusiast84 thanks for sending this over. |
|
Hello @3verse and thanks for the question! I state that I am not an expert systems engineer but from what little I remember during the examination of databases is that creating a database structure as simple as possible for queries is the best choice. This is why I am "pushing" those responsible for this project to create files of this type ... ease of organizing data in any way rather than, for example, creating a column for each day. For curiosity: I write from Italy... P.S:I'm sorry for my bad English... |
|
hi @DataEnthusiast84, Definitely the structure with all dates spread across columns didn't make much sense to me as I would probably consider one record per day/location, so I agree with you on that one - it must be related to how other tools can digest it, I'm using Tableau for my visualisations for example and I could still pivot it in a way that works well, although it would force me to having to do this every day to update my dashboards. As per the use of three columns per confirmed/recovered/deaths I'd suggest that approach so that's simply easier to get totals by days without having to resort to complicated queries when selecting the data. Say, for example, you want to get a daily total of confirmed/recovered/deaths to trend them on a line chart, you'd only have to query something that would look like makes sense? p.s.: absolutely no need to apologise :) also, I'm from Italy too but I live in London at the moment. |
|
Hello @3verse it is a pleasure to talk to you! In the case of a structured DB as I proposed, it would be enough to insert a clause of type "where". select date, region, sum (value) Warning: in the data set that is made available the sum (value) or the sum (confirmed) does not provide readable data since the daily data are the "accumulated" and not only the new cases. The new cases are the difference between day n and day n-1. Regarding the number of columns, I imagine that for example mysql places a limit on the management of the columns. Generally speaking, it is always better to have a DB with "infinite" rows than a DB with numerous columns! I hope I explained myself with my bad English! |
|
Pleasure is mine @DataEnthusiast84 :) |
|
Update: DB structure at 24/02/2020 |
I manipulated the file structure and created a single DB with the following structure
| Data | Province / State | Country / Region | Type | Value |
The manipulation was done by hand so the file is not updated systematically. I hope we can automate data extraction with this structure in order to make the analysis easier.
Obviously report any errors
Covid 19.xlsx
Good luck to all
The text was updated successfully, but these errors were encountered: