Skip to content

carlospramalheira/covid19

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Independent project to gather portuguese COVID-19 data and share STATA scripts to download data, run analysis and draw graphs. Last update: 16/04/2020.

Contents:

Databases

  • Portuguese General Directorate of Health (DGS) nationwide daily data: contacts under survailance, suspected cases, unconfirmed cases, cases pending test result, confirmed cases, inpatient, admitted to intensive care units, recovered cases and deaths.
  • Portuguese General Directorate of Health (DGS) nationwide daily data: confirmed cases and deaths by sex, age and day of report.
  • Portuguese General Directorate of Health (DGS) regional level data: confirmed cases and deaths by NUTS2 and day of report.
  • European Centre for Disease Prevention and Control (situation update worldwide): confirmed cases, deaths and population by country and day of report.
  • John Hopkins University Repository (daily reports): confirmed cases and deaths by country (region level data available for some countries) and day of report.

Variable description

In portuguese datasets the report date refers to data from the previous day. For example, the report from 07/04 has 06/04 data.

Raw variables available in daily reports:

    "contacts": population who came into contact with known positive cases and are under survailance by the authorities
    "cases_all": all suspected cases according to DGS ("Todos os casos suspeitos"). = confirmed cases + unconfirmed cases + cases pending test result
    "cases_resultpending": suspected cases waiting for test result
    "cases_unconfirmed": not confirmed cases
    "cases_confirmed": confirmed COVID-19 cases
    "inpatient": COVID-19 cases admitted into hospital care
    "icu": COVID-19 cases addmited into intensive care units
    "recovered": recovered COVID-19 cases
    "deaths": deaths by COVID-19
    
MOST RAW VARIABLES ARE CUMULATIVE

Variables obtained from raw data or introduced to the database:

    "pop": portuguese population estimate
    "cov_rate": disease rate = confirmed cases * 100.000 / population
    "lethal_rate": lethality rate = deaths * 100.000 / confirmed cases
    "mortality_rate": mortailty rate = deaths * 100.000 / population

    "*_new": any variable with this ending is an absolute change from the previous day, new cases when applicable
    "*_pct": any variable with this ending is a percentual change from the previous day
    
    "days": number of days from the diagnosis of the first COVID-19 case
    "days_rt": number of days from disease rate greater or equal to 1/100.000 hab.
    "days_mrt": number of days from mortality rate greater or equal to 1/100.000 hab.

STATA scripts to download currently available data

Code to download and setup the latest Portuguese data:

cd "C:\Users\Carlos\COVID19\" // choose your local working folder
do "https://github.com/carlospramalheira/covid19/raw/master/scripts/covid_pt.do"

Code to download and setup the latest ECDC data:

cd "C:\Users\Carlos\COVID19\" // choose your local working folder
do "https://github.com/carlospramalheira/covid19/raw/master/scripts/covid_ecdc.do"

Code to download and setup the latest John Hopkins University data:

cd "C:\Users\Carlos\COVID19\" // choose your local working folder
do "https://github.com/carlospramalheira/covid19/raw/master/scripts/covid_jhu.do"

Code to download and setup ALL DATABASES:

cd "C:\Users\Carlos\COVID19\" // choose your local working folder
do "https://github.com/carlospramalheira/covid19/raw/master/scripts/covid.do"

We strongly advice to download raw data using STATA. Alternatively you can download .csv files from the datasets folder above to use with R, Microsoft Excel or other program. Please bear in mind: these files might not be uptdated as oftenly!

Data Sources:

Portuguese Oficial Reports

World Data Repository by Johns Hopkins CSSE:

Authors:

  • Carlos P. Ramalheira, MD
  • Carlos Ramalheira, MD

Contact Us:

Terms of Use:

This GitHub repository and its contents herein, including all data and analysis, copyright rights reserved, is provided to the public strictly for educational and academic research purposes. The Website relies upon publicly available data from multiple sources, that do not always agree. Reliance on the Website for medical guidance or use of the Website in commerce is strictly prohibited.