/ras

Re-balancing or disaggregating a matrix using the RAS algorithm

Primary LanguagePythonMIT LicenseMIT

RAS

Overview

This code is used for re-balancing or disaggregating an n by m matrix using the RAS algorithm. The application of this algorithm is to fill n unknown elements in an Input Output Table, either for projected results, or when splitting economic sectors. This algorithm uses a 'seed' matrix as the basis for bi-proportional re-balancing of a 'goal' matrix, using a new set of row and column sums. The intention is to produce a new matrix which has otherwise unknown matrix elements, using known row and column sums and known matrix elements for a similarly proportioned matrix.

The algorithm is complete when there are no differences between the row and column totals (i.e. when the matrix is balanced).

Requirements

The algorithm was written using the following packages;

  • numpy==1.14.2
  • pandas==0.25.2

There are no other known dependencies.

References

RAS Algorithm based on;

Open Access and transparency

This code is provided open access in accordance with NERC Guidance on Preservation of NERC Model Code and Model Output