Disagg
Disaggregation tools for:
- Spatial disaggregation
- Temporal disaggregation
SpatialDisaggregator
Source code in src/rpycpl/disagg.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
use_static_reference(data, reference_data)
Use a reference year to disaggregate the quantity spatially
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
Series
|
The data to be disaggregated. Dims: (year,). |
required |
reference_data
|
Series
|
The reference data for disaggregation. E.g the distribution for a reference year. Dims: (space,). |
required |
Returns: pd.DataFrame: The disaggregated data. Dims: (space, year).
Source code in src/rpycpl/disagg.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
validate_reference_data(reference_data)
Check reference data has expected format
Parameters:
Name | Type | Description | Default |
---|---|---|---|
reference_data
|
Series
|
The reference data for disaggregation. |
required |
Raises: TypeError: If reference data is not a pandas Series. ValueError: If reference data index does not match target nodes. ValueError: If reference data is not normalised to 1.
Source code in src/rpycpl/disagg.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|