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

glacier-melt

v0.0.2

Published

Impact Framework plugin for predicting ice melt.

Downloads

2

Readme

Glacier melt plugin

The glacier melt plugin estimates the amount of global glacier ice melted (kg) as a result of carbon emissions. This enables Impact Framework users to estimate the glacier ice melted due to their software applications.

This is based on back-of-envelope calculations shared on Ken Caldeira's blog here: https://kencaldeira.wordpress.com/2018/03/24/how-much-ice-is-melted-by-each-carbon-dioxide-emission/

It's not a super rigorous calculation, and should only be used for illustrative purposes and not used as the basis for any scientific endeavours, audits etc.

Parameters

  • carbon: the amount of carbon emitted per timestep in gCO2eq

Global config

This plugin does not require any global config

Returns

  • glacier-melt: g of ice melted

Implementation

The glacier melt plugin is a very simple plugin with no global config. It operates only on the carbon value provided in the inputs array in your manifest file.

Usage

To run the plugin, an instance of GlacierMelt must be created. Then, the plugin's execute() method can be called.

This is how you could run the model in Typescript:

import {GlacierMelt} from './lib/glacier-melt';

const plugin = GlacierMelt();

const result = plugin.execute([
  {
    timestamp: '2023-08-06T00:00',
    duration: 3600,
    carbon: 10,
  },
]);

console.log(result);

Example Manifest

name: glacier melt demo
description: a minimal manifest executing the glacier melt plugin for a single timestep
tags:
initialize:
  plugins:
    glacier-melt: 
      path: 'glacier-melt'
      method: GlacierMelt
tree:
  children:
    child-0:
      defaults:
        cpu/thermal-design-power: 100
      pipeline:
        - glacier-melt
      inputs:
        - timestamp: 2023-07-06T00:00
          duration: 1
          carbon: 20