Skip to content

opennem/energy-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5016c7c · Dec 23, 2020

History

30 Commits
Oct 27, 2020
Oct 27, 2020
Oct 27, 2020
Oct 29, 2020
Oct 28, 2020
Oct 27, 2020
Oct 29, 2020
Oct 27, 2020
Oct 29, 2020
Oct 27, 2020
Oct 27, 2020
Oct 28, 2020
Oct 27, 2020
Oct 27, 2020
Oct 27, 2020
Oct 27, 2020
Oct 27, 2020
Oct 27, 2020
Oct 27, 2020
Oct 27, 2020
Dec 23, 2020
Oct 27, 2020
Oct 27, 2020
Oct 27, 2020
Oct 27, 2020

Repository files navigation

OpenNEM Energy Functions

Energy functions in Javascript.

Install

$ yarn add @opennem/energy-tools

Functions

/**
 * Calculate energy sum
 *
 * @param series power values
 * @param bucket_size_minutes size of the bucket in minutes
 */
export function energy_sum(
  series: number[],
  bucket_size_minutes: number,
): number

Usage

import { energy_sum } from "@opennem/energy-tools"

let energy = energy_sum([1, 2], 5)