Covid Database

varwoche

Penultimate Amazing
Staff member
Joined
Feb 19, 2004
Messages
18,218
Location
Puget Sound
I'm creating a database for capturing data surrounding covid-19. There are many organizations that have implemented such databases, but there are some features I'd like that I don't see elsewhere. (Also this is a cabin fever skills refresher, so I'm glad to invest the time.)

Features I intend to include:

* able to store data at Country, State, and/or Subdivision (e.g. County) granularity
* use standardized codes for geographic keys
* implement numeric facts (e.g. Cases, Deaths) without schema change
* support multiple versions of the same numeric fact

I'm doing the project in MS SQL Server but I'm avoiding features specific to the product in case I want to port it to a different DB platform.

I'll be posting here as I progress and I welcome feedback.
 
Very cool. Is this going to be just a personal project or is there going to be a publicly available interface of some kind to the database?
 
I definitely would like to make it public. Minimally I'll create pivots in google sheets or excel and make those public.
 
Probably not what you have in mind for the thread, but maybe these kind of links could be of use to people reading the thread.

CDC MMWR: Characteristics of Health Care Personnel with COVID-19 — United States, February 12–April 9, 2020

Smart Air: The Ultimate Guide to Homemade Face Masks for Coronavirus.
It's an excellent article evaluating face mask materials, thorough study of all sorts of materials.

COVID-19 Superspreader Events in 28 Countries: Critical Patterns and Lessons

Coronavirus Treatment Could Lie in Existing Drugs has a list of current drugs under study and the status of the research. But it is from back in Feb so I'll look for a more recent source.
 
Last edited:
Some design features I'm not implementing which experience tells me could bite me in the ass down the road:

  • No Date table. Implications: no integer keys for dates (performance, who cares with this relatively small data set), no easy prevention of date gaps on charts, custom date rollups become complicated.
  • No staging area -- everything in one database.
  • No incremental updates. Data refresh will require full reload.
 
Data sources
For Australia you can use https://www.health.gov.au/news/heal...ent-situation-and-case-numbers#current-status
The above is primary data.

For the rest of the world you can use https://www.worldometers.info/coronavirus/#countries

I keep a record of the number of cases in a spreadsheet. This includes a couple of graphs you can use. I can give you that if you wish. Just send me a PM. I use the above sources for my spreadsheet. Please note all sources will give you different information. One of the issues is when is midnight?

I assume you have seen this https://coronavirus.jhu.edu/map.html as you have mentioned John Hopkins. Please note one of his sources is worldmeters so despite the fact that he is the go-to site it is a tertiary source of information.

You should also ask where does everyone get their information from? Then try to get it from primary sources. Much better than other sources. Otherwise what value are you adding to the data?

Edit. I see the John Hopkins give you sources, including the one I mentioned above. Maybe you should use their sources and do it better than John Hopkins. List your assumptions and methods.
 
Last edited:
Many thanks!

Of course I'm paying attention to data sourcing. And yes, I did notice that John Hopkins sources from worldometer (among many others). Coincidentally, they took some flack in the news recently for sourcing from worldometer (which I dont care about). And yes indeed, if I had time I would try to eliminate intermediary sources.

If there is value to this project -- a big if -- it won't be due to better data sourcing/quality than these various data teams that have far more resources than me. It will be due to a superior, flexible schema that allows new numeric facts without schema change.

Ideally (and optimistically) I will prove the value, then hand it off to someone else for care and feeding.
 
The devil is in the devilish details. Per usual.

John Hopkins treats the cruise ships (and military?) as separate geographic entities. This won't integrate with my nicely arranged/keyed geography tables. I'll add a country named Other and these weird entities will be States inside of Other.
 
So far as I can tell, worldometer doesn't provide a downloadable file with time series data, which is an essential requirement.
 
Ugh. The John Hopkins downloadable data is structured in a way to make it highly impractical to import. Dates are spread horizontally...

Geography May1 May2 May3 ... etc

as opposed to...

Geography Date

I need tall and skinny, not short and and fat (and fatter by the day).

With a variable number of columns, in order to normalize this data I'll need to write procedural code (which I avoid like the plague, wisely). I can do it in a stored procedure using a cursor, but that will likely be SQL Server specific. Ugh again.

Alternately, they have a separate file for each day. Not useful either.
 
Last edited:
Code:
Ugh. The John Hopkins downloadable data is structured in a way to make it highly impractical to import. Dates are spread horizontally...

Geography May1 May2 May3 ... etc

as opposed to...

Geography Date

I need tall and skinny, not short and and fat (and fatter by the day).

With a variable number of columns, in order to normalize this data I'll need to write procedural code (which I avoid like the plague, wisely). I can do it in a stored procedure using a cursor, but that will likely be SQL Server specific. Ugh again.

Alternately, they have a separate file for each day. Not useful either.

If you were using Microsoft Excel the procedure for that is

1. Copy the data into the clipboard.
2. Open a new spreadsheet
3. Right click and click on paste special ...
4. Tick transpose box (bottom right corner)
5. Click ok.

Result: Everything is rotated 90 degrees.
 
If you were using Microsoft Excel the procedure for that is

1. Copy the data into the clipboard.
2. Open a new spreadsheet
3. Right click and click on paste special ...
4. Tick transpose box (bottom right corner)
5. Click ok.

Result: Everything is rotated 90 degrees.
Yes thanks, I appreciate your input!

Alas, in addition to my Office subscription having expired, it's not practical to automate for a variety of reasons.
 
Varwoche, try LibreOffice as a replacement for MS Office.

There is a slight learning curve but in my (very unsophisticated) spreadsheet use I haven't found any functions in MO that are not implemented in LO.

As the name implies it is free.
 
Last edited:
Varwoche, try LibreOffice as a replacement for MS Office.

There is a slight learning curve but in my (very unsophisticated) spreadsheet use I haven't found any functions in MO that are not implemented in LO.

As the name implies it is free.
I'm using google sheets currently, which I reluctantly pay for. I'll definitely check out libre.

My main needs are (1) pivot tables and (2) shareability of same.
 
I've been tracking new deaths and cases in a spreadsheet (Apache Open Office, although I'm given to understand Libre is better) and doing a 10-day running average to smooth out the weekend reporting anomaly. I'm wondering if 10 days is the best sort of period for that however.
 
I've been tracking new deaths and cases in a spreadsheet (Apache Open Office, although I'm given to understand Libre is better) and doing a 10-day running average to smooth out the weekend reporting anomaly. I'm wondering if 10 days is the best sort of period for that however.

I would suggest 7 days would be better. Or 14 if you do not mind sluggish changes.
 

ISF - Join now!

Every member here is approved by hand. No bots, no spam, just people who care about evidence and honest debate.

Membership is free!

Create your free account

Back
Top Bottom