Skip to content

Extract COVID19 admissions data from the Norwegian Directorate of Health API

Notifications You must be signed in to change notification settings

frefrik/covid19-nor-admissions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

covid19-nor-admissions

Scheduled data update

Description

The Norwegian Directorate of Health (Helsedirektoratet) offers an API on the dataset that is used to display daily updated figures on the number of patients admitted to hospitals with proven covid-19, and the number of hospitalized patients receiving respiratory care.

This script extracts COVID19 admissions data from the API and saves the results in .csv and .xlsx format.

The official view of the data is available here: https://www.helsedirektoratet.no/statistikk/antall-innlagte-pasienter-pa-sykehus-med-pavist-covid-19

Updates

Helsedirektoratet updates their dataset once a day, at 12:30 PM (CEST).
The datafiles in this repository are automatically updated daily at 12:40 PM (CEST) with the newest set of data.

Usage

Get your API-key here: https://utvikler.helsedirektoratet.no/

Rename config.dist.yml to config.yml and replace APIKEY with your API-key

# config.yml
api:
  key: APIKEY

Run script:

$ python3 get_data.py

The output will be saved to data/

About

Extract COVID19 admissions data from the Norwegian Directorate of Health API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages