result_network.ResultNode
result_network.ResultNode(self, node, res1d)
Class for wrapping a single ResultData node.
Parameters
Name | Type | Description | Default |
---|---|---|---|
res1d |
Res1D | Res1D object the node belongs to. | required |
Attributes
Name | Description |
---|---|
bottom_level | Bottom level of the node. |
critical_level | Critical level of the node. |
derived_quantities | A list of available derived quantities. |
diameter | Diameter of the node. |
geometry | A geometric representation of the node. Requires shapely. |
ground_level | Ground level of the node. |
group | The TimeSeriesIdGroup assosciated with this location. |
id | Node ID. |
quantities | A list of available quantities. |
type | Node type. |
xcoord | X coordinate of the node. |
ycoord | Y coordinate of the node. |
Methods
Name | Description |
---|---|
add_derived_quantity | Add a derived quantity to the result location. |
add_query | Add a query to ResultNetwork.queries list. |
add_to_network_result_quantity_map | Add a ResultQuantity to map of all possible ResultQuantities. |
add_to_result_quantity_map | Add to a given result quantity map. |
add_to_result_quantity_maps | Add node result quantity to result quantity maps. |
get_m1d_dataset | Get IRes1DDataSet object associated with ResultNode. |
get_query | Get a QueryDataNode for given data item. |
read | Read the time series data for all quantities at this location into a DataFrame. |
remove_derived_quantity | Remove a derived quantity from the result location. |
set_quantities | Set all quantity attributes. |
set_quantity | Set a single quantity attribute on the obj. |
set_quantity_derived | Set a single derived quantity attribute on the obj. |
set_static_attribute | Add static attribute. This shows up in the html repr. |
set_static_attributes | Set static attributes. These show up in the html repr. |
add_derived_quantity
result_network.ResultNode.add_derived_quantity(derived_quantity)
Add a derived quantity to the result location.
add_query
result_network.ResultNode.add_query(data_item)
Add a query to ResultNetwork.queries list.
add_to_network_result_quantity_map
result_network.ResultNode.add_to_network_result_quantity_map(result_quantity)
Add a ResultQuantity to map of all possible ResultQuantities.
Parameters
Name | Type | Description | Default |
---|---|---|---|
result_quantity |
ResultQuantity | ResultQuantity object to be added to the result_quantity_map. | required |
Returns
Type | Description |
---|---|
TimeSeriesId | The TimeSeriesId key of the added ResultQuantity |
add_to_result_quantity_map
result_network.ResultNode.add_to_result_quantity_map(quantity_id, result_quantity, result_quantity_map)
Add to a given result quantity map.
Parameters
Name | Type | Description | Default |
---|---|---|---|
quantity_id |
str | Quantity id. | required |
result_quantity |
ResultQuantity | One of the possible ResultQuantity objects corresponding to a quantity id. | required |
result_quantity_map |
dict | Dictionary from quantity id to a list of ResultQuantity objects. | required |
add_to_result_quantity_maps
result_network.ResultNode.add_to_result_quantity_maps(quantity_id, result_quantity)
Add node result quantity to result quantity maps.
get_m1d_dataset
result_network.ResultNode.get_m1d_dataset(m1d_dataitem=None)
Get IRes1DDataSet object associated with ResultNode.
Parameters
Name | Type | Description | Default |
---|---|---|---|
m1d_dataitem |
Ignored for ResultNode. | None |
Returns
Type | Description |
---|---|
IRes1DDataSet | IRes1DDataSet object associated with ResultNode. |
get_query
result_network.ResultNode.get_query(data_item)
Get a QueryDataNode for given data item.
read
result_network.ResultNode.read(column_mode=None)
Read the time series data for all quantities at this location 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 |
remove_derived_quantity
result_network.ResultNode.remove_derived_quantity(derived_quantity)
Remove a derived quantity from the result location.
set_quantities
result_network.ResultNode.set_quantities()
Set all quantity attributes.
set_quantity
result_network.ResultNode.set_quantity(obj, data_item, element_index=0)
Set a single quantity attribute on the obj.
set_quantity_derived
result_network.ResultNode.set_quantity_derived(derived_quantity)
Set a single derived quantity attribute on the obj.
set_static_attribute
result_network.ResultNode.set_static_attribute(name)
Add static attribute. This shows up in the html repr.
set_static_attributes
result_network.ResultNode.set_static_attributes()
Set static attributes. These show up in the html repr.