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

@rustyconover/nyiso-electricity-models

v0.0.12

Published

A collection of Tensorflow.js models for NYISO electricity demand, generation and pricing for use with microprediction.org.

Downloads

9

Readme

NYISO Electricity Models using Tensorflow.js

This module is a collection of Tensorflow.js models that I've created in Julia using Flux but have exported to Tensorflow.js so that they can be used in browsers and via AWS Lambda functions.

The models included are:

  • Electricity demand for each NYISO zone.
  • Wind power generation (NYISO wide)
  • Solar power generation (NYISO wide)
  • Locational Based Marginal Prices (LBMP) for each NYISO zone

The models make forecasts at the ~1 minute, 5 minutes, 15 minutes and 1 hour ahead of time horizons. Each model produces 225 guesses about what the true value will be to form a probablity distribution.

Microprediction.org Prediction Bot

A simple Microprediction.org prediction robot is included in src/bot/bot.ts that submits the predictions from the models as part of the electicity prediction competition.

Examples

Utilize a model to generate predictions.

This example shows how to use a model to generate predictions:

import * as models from "@rustyconover/nyiso-electricity-models";
import moment from "moment";

async function exampleModelUsage() {
  // Load a model that predicts the overall electicity load/demand
  // for the entire state of New York an hour ahead.
  //
  // 12 forecast intervals ahead is an hour since each forecast
  // interval is five minutes.
  const model = models.getModel("electricity-load-nyiso-overall.json", 12);
  const target_time = moment.utc().format("YYYY-MM-DDTHH:mm:ss");

  // Obtain the weather information for the model.
  const weather = await models.getWeatherForModels([model], target_time);

  // Obtain the stream data for the model.
  const stream_data = await models.getStreamValuesForModels(
    [model],
    target_time
  );

  // Obtain the regressors of the model.
  const regressors = await model.regressors(
    target_time,
    weather,
    stream_values
  );

  // Using the regressors retrieve the predictions.
  const predicted_values = await model.predict(regressors);

  // The 225 predicted values form a non-parameteric probablity distribution
  // which express the model's prediction of the electricity demand
  // an hour from the current time.

  console.log(predicted_values);
}

exampleModelUsage().catch((e) => {
  console.error(e);
  process.exit(1);
});

Model Data Sources

The models use data from these sources:

  1. High Resolution Rapid Refresh forecast products from NCEP/NOAA:

    • Temperature
    • Surface Pressure
    • 2 Meter Dewpoint Temperature
    • 2 Meter Relative Humidity
    • 10 Meter U/V Wind Components
    • Downward Short-Wave Radiation Flux
    • Visible Beam Downward Solar Flux
    • Visible Diffuse Downward Solar Flux
    • Total Cloud Cover
    • Low Cloud Cover
    • High Cloud Cover
    • Middle Cloud Cover
  2. Existing electicity demand forecasts from NYISO.

The models where trained the continuous ranked probablity score used as the loss metric.

All of the code necessary to generate features, perform feature selection and train/test these models is open source.

These models are released under the MIT license and will be updated from time to time.

If you have feedback email [email protected].