result_network.ResultGlobalDatas

result_network.ResultGlobalDatas(self, res1d)

Class for wrapping ResultData global data items.

By itself it is also a dict, which contains mapping between global data item quantity ID and IDataItem object.

Parameters

Name Type Description Default
res1d Res1D Res1D object the catchments belong to. required

Attributes

Name Type Description
result_global_data_list list of ResultGlobalData objects list of all ResultGlobalData objects corresponding to all res1d.data.GlobalData.DataItems.

Methods

Name Description
add_derived_quantity Add a derived quantity to the result network.
read Read the time series data for all quantities at these locations into a DataFrame.
remove_derived_quantity Remove a derived quantity from the result network.
set_global_data Create the ResultGlobalData objects. No attributes are set here.
set_quantity_collections Set all quantity collection attributes.
set_quantity_derived Set a single derived quantity attribute on the obj.
set_res1d_global_data_to_dict Create a dict entry from data item quantity ID to IDatItem object.
set_res1d_object_to_dict Create a dict entry from a key name to an object or a list of objects.

add_derived_quantity

result_network.ResultGlobalDatas.add_derived_quantity(derived_quantity)

Add a derived quantity to the result network.

Parameters

Name Type Description Default
derived_quantity DerivedQuantity Derived quantity to be added to the result network. required

read

result_network.ResultGlobalDatas.read(column_mode=None, include_derived=False)

Read the time series data for all quantities at these locations into a DataFrame.

Parameters

Name Type Description Default
column_mode str | ColumnMode(optional) Specifies the type of column index of returned DataFrame. ‘all’ - column MultiIndex with levels matching TimeSeriesId objects. ‘compact’ - same as ‘all’, but removes levels with default values. ‘timeseries’ - column index of TimeSeriesId objects None
include_derived bool Include derived quantities. False

remove_derived_quantity

result_network.ResultGlobalDatas.remove_derived_quantity(derived_quantity)

Remove a derived quantity from the result network.

Parameters

Name Type Description Default
derived_quantity DerivedQuantity or str Derived quantity to be removed from the result network. Either a DerivedQuantity object or its name. required

set_global_data

result_network.ResultGlobalDatas.set_global_data()

Create the ResultGlobalData objects. No attributes are set here.

set_quantity_collections

result_network.ResultGlobalDatas.set_quantity_collections()

Set all quantity collection attributes.

set_quantity_derived

result_network.ResultGlobalDatas.set_quantity_derived(derived_quantity)

Set a single derived quantity attribute on the obj.

set_res1d_global_data_to_dict

result_network.ResultGlobalDatas.set_res1d_global_data_to_dict(data_item)

Create a dict entry from data item quantity ID to IDatItem object.

set_res1d_object_to_dict

result_network.ResultGlobalDatas.set_res1d_object_to_dict(dict_key, obj)

Create a dict entry from a key name to an object or a list of objects.