npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

on-covid-19

v0.1.3

Published

An overly simplified COVID-19 infection estimator API

Downloads

19

Readme

on-covid-19

An overly simplified COVID-19 infections spread estimation API. Think of this as a simple and intuitive programming interface that allows you to take in data and own estimating the impact of Covid-19 infections for a population, over a given period of time.

Using this tiny utility, you have the foundation to be able to astimate and say the following:

Given the Nigerian population, five hospital beds per 10,000 people, and total reported cases of 150, in 40 days from now there'll likely be 79 unallocated hospital / isolation centre beds left to treat ~1,500 severe COVID-19 cases who require hospitalization to recover - unless we collectively practice active social distancing and proper hand hygine.

How do we intend to care for the remianing 1,403 patients in severe condition who require hospitalization to recover? With that number, we would need more than 12 additional isolation centres with the capacity of the one GTBank donated to Lagos State, each with 110 beds!

Please note that while this API provides and programming interface and some input data, the client code is soely responsible for the final estimation, and all of this is just to demonstrate what is possible. Unless you can support your estimation with the right input parameters and data, as well as the right analysis, your estimation is not meant to be a statement of fact or an authority.

Unless authorised by a credible body, we reccomend you treat all estimations as observations for healthy discussions


Installation & Setup

  1. Install the package
    npm -i on-covid-19
    yarn add on-covid-19
  2. Import and use the api's utilities
    // src/estimator.js
    import { PERIOD, whatPercentOf, whatIs } from 'on-covid-19';
    
  3. Import and use the core api
    // src/app.js
    import { onCovid19 } from 'on-covid-19';
    

Usage

Below is how this library could be used. See the API documentation for more details

// src/estimator.js
import { PERIOD, whatPercentOf, whatIs } from 'on-covid-19';
const covid19ImpactEstimator = data => {
  // this is where the estimation 
  // will happen, using all that is in 
  // the input data parameter object

  return {};
};

export default covid19ImpactEstimator;

// src/app.js
import estimator from "./estimator.js";
import { onCovid19 } from "on-covid-19";

const lagosNG = {
  ...,
  reportedCases: 50,
  population: 22000000
};

const result = onCovid19(lagosNG, estimator)
  .estimateImpactAfter(30)
  .days();

console.dir(result);