MatricesBase.disaggregate#

MatricesBase.disaggregate(targets, from_segment=None, to_segment=None, *, output_name='{name}-disaggregated', progress_bar=True, ignore_if_exists=True)[source]#

Disaggregate matrices to a target segmentation.

Optionally a single segment can be translated to another one as part of the disaggregation.

Parameters:
  • targets (MatricesBase) – Matrices at the target segmentation which are used to calculate disaggregation factors.

  • from_segment (Segment | None) – Optional segment to be removed and replaced by to_segment, mandatory if to_segment is given.

  • to_segment (segments.Segment | None, optional) – Optional segment to replace the from_segment, mandatory if from_segment is given.

  • output_name (str) – Name of disaggregated matrices defaults to “{name}-disaggregated”, will replace “{name}” with the name of this instance.

  • progress_bar (bool) – If True display progress bar for disaggregation.

  • ignore_if_exists (bool) – If True check if all disaggregated matrices already exist and don’t attempt to recreate.

Returns:

Disaggregated matrices as a new instance of this class.

Return type:

Self

Raises:

ValueError

  • If target matrix type or zoning are different. - If one, but not both, of from_segment and to_segment are given. - If targets.segmentation doesn’t contain all segments found in self.segmentation.