Giter Site home page Giter Site logo

aemo's Introduction

AEMO Gem

Makes working with AEMO data more pleasant.

Gem Version Build Status Maintainability Test Coverage Coverage Status Known Vulnerabilities Help Contribute to Open Source Quality Gate Status

Documentation

http://www.rubydoc.info/gems/aemo

Installation

Ruby Versions Supported

  • ruby-head (failures allowed)
  • 3.2
  • 3.1

Deprecated

  • < 3.1

Manually from RubyGems.org

% gem install aemo

Or if you are using Bundler

# frozen_string_literal: true

# Gemfile
source 'https://rubygems.org' do
  gem 'aemo'
end

Maintenance

Updating loss factors

  1. Connect to AEMO via VPN (tip: be a market participant in order to unlock this step)
  2. Log in to MSATS
  3. Navigate to Reports and Alerts » CATS » C1 - Data Replication Resynchronisation Report - Data Replication Resynchronisation Report (C1)
  4. Export both the CATS_DLF_CODES and CATS_TNI_CODES tables (from 1-Jan-1970 to the current date, both with 30,000 max rows)
  5. Wait...
  6. Wait some more...
  7. Navigate to Participant Outbox (you have new messages link)
  8. Get the file!
  9. Run the following:
    cd lib/data && ruby xml_to_json.rb
  10. Add tests for your new FY to spec/lib/aemo/nmi_spec.rb
  11. rspec - note that AEMO can retroactively change factors so if there is an old failing test double check the json to make sure it's not AEMO's fault.
  12. Commit, push & create a pull request

aemo's People

Contributors

dependabot[bot] avatar jufemaiz avatar onsabimana avatar schneems avatar sjauld avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

aemo's Issues

AEMO::NEM12 » 300 row » IntervalValue1 . . . IntervalValueN with nil value not raising an error

NEM12 file was parsed raising:

NoMethodError: undefined method `match' for nil:NilClass Did you mean? catch

This was caused due to a 300 row with the following representative data:

300,20180529,0.001,0.0,0.0,0.001,0.0,0.0,0.001,0.0,0.001,0.0,0.0,0.001,0.005,0.01,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.001,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,,,,,,,,,,,,,,,,,A,,,20180529160239,

The empty values should not have been empty but rather 0, with a flag of N raised for them. This is due to NEM12 export functionality being used on a dataset that was for the present day.

What should happen is that an exception is raised during the parsing of the dataset as the value present is not valid.

A valid dataset would look like:

300,20180529,0.001,0.0,0.0,0.001,0.0,0.0,0.001,0.0,0.001,0.0,0.0,0.001,0.005,0.01,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.001,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,A,,,20180529160239,
400,1,32,A,,
400,33,48,N,,

This would signify no value for the last 16 elements of the 48 provided here (30 minute interval data).

Likewise, 0 could be a valid value and be without the subsequent 400 rows (but not for the example above)

JSON dependency open-ended

WARNING:  open-ended dependency on json (>= 1.7.5) is not recommended
  if json is semantically versioned, use:
    add_runtime_dependency 'json', '~> 1.7', '>= 1.7.5'
WARNING:  See http://guides.rubygems.org/specification-reference/ for help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.