Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

corona-hub-germany/covid19-risklayer-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

covid19-risklayer-data

A npm module to load covis-19 case-data from a risklayer source

Setup

npm install --save-dev covid19-risklayer-data

Usage

To have access to the google-docs API you'll need to create personal credentials. This process is explained in the here.

Data

The following fields are returned if they exists:

  • GEN
  • BEZ
  • AGS
  • cases
  • immune
  • quarantine
  • intensive
  • deaths
  • time

Example

const { getCopyright, getData } = require('covid19-risklayer-data');

(async () => {
	const coyright = getCopyright();
	console.log(`Copyright: ${coyright}\n`);

	const data = await getData({
		clientEmail: process.env.GOOGLE_SERVICE_ACCOUNT_EMAIL,
		privateKey: process.env.GOOGLE_PRIVATE_KEY,
	});

	console.log(`First dataset: ${JSON.stringify(data[0], null, 2)}\n`);
})();

Output:

First dataset: {
  "GEN": "Dithmarschen",
  "BEZ": "Kreis",
  "AGS": 1051,
  "cases": 12,
  "quarantine": 11,
  "time": 43911.61415241898
}

License

AGPL-3.0-or-later

Copyright 2020 by Alexander Wunschik dev@wunschik.net and contributors