covid-data-module

1.1.2 • Public • Published

COVID-Data-Module

This is a simple module for tutorial purposes.
It fetches US data from the COVID Tracking Project at https://covidtracking.com/api/us using https

Installation

Download node at nodejs.org and install it, if you haven't already.

How to Install

npm i covid-data-module

How to test

  1. Create a test.js

var mymodule = require('covid-data-module')
mymodule.printStats()

2. Run the following node test.js
  1. Sample Output after running
COVID US from url=covidtracking.com/api/us
[
  {
    positive: 462191,
    negative: 1921401,
    pending: 17758,
    hospitalizedCurrently: 47242,
    hospitalizedCumulative: 49160,
    inIcuCurrently: 12234,
    inIcuCumulative: 928,
    onVentilatorCurrently: 5796,
    onVentilatorCumulative: 41,
    recovered: 21471,
    hash: 'b2ba9a6b1a8986ac4044c284b8ab368c8980b8c2',
    lastModified: '2020-04-10T17:12:17.741Z',
    death: 16642,
    hospitalized: 49160,
    total: 2401350,
    totalTestResults: 2383592,
    posNeg: 2383592,
    notes: 'NOTE: "total", "posNeg", "hospitalized" will be removed in the future.'
  }
]

Contact

Author: Anthony Ku Ong
Website: www.anthonykuong.com
NPM Module:https://www.npmjs.com/package/covid-data-module

Readme

Keywords

none

Package Sidebar

Install

npm i covid-data-module

Weekly Downloads

9

Version

1.1.2

License

ISC

Unpacked Size

17.1 kB

Total Files

8

Last publish

Collaborators

  • anthonykuong