1 LinkTable
LinkTable(**data)Defines the connections between nodes.
1.1 Attributes
| Name | Description |
|---|---|
| df | |
| filepath | |
| is_external | |
| is_internal | |
| lazy | |
| model_config | |
| root | Return the uppermost parent model of this ChildModel. |
1.2 Methods
| Name | Description |
|---|---|
| add | Add a link between nodes. |
| allows_lazy | Whether this FileModel allows lazy loading. |
| check_parent | |
| columns | Retrieve column names. |
| default_filepath | |
| diff | |
| get_inputdir | |
| model_dump | |
| plot | Plot the links of the model. |
| read | Read the data for this Table from disk. |
| sort | |
| tablename | Retrieve tablename based on attached Schema. |
| tableschema | Retrieve Pandera Schema. |
| write | Write the data for this Table to disk. |
1.2.1 add
LinkTable.add(
from_node,
to_node,
geometry=None,
name='',
link_id=None,
**kwargs,
)Add a link between nodes.
The type of the link is automatically inferred from the node types.
1.2.1.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| from_node | NodeData | A node indexed by its node ID, e.g. model.basin[1] |
required |
| to_node | NodeData | A node indexed by its node ID, e.g. model.linear_resistance[1] |
required |
| geometry | LineString | MultiLineString | None | The geometry of a line. If not supplied, it creates a straight line between the nodes. | None |
| name | str | An optional name for the link. | '' |
| link_id | int | An optional non-negative link ID. If not supplied, it will be automatically generated. | None |
| **kwargs | Dict | {} |
1.2.2 allows_lazy
LinkTable.allows_lazy()Whether this FileModel allows lazy loading.
1.2.3 check_parent
LinkTable.check_parent()1.2.4 columns
LinkTable.columns()Retrieve column names.
1.2.5 default_filepath
LinkTable.default_filepath()1.2.6 diff
LinkTable.diff(other, ignore_meta=False)1.2.7 get_inputdir
LinkTable.get_inputdir()1.2.8 model_dump
LinkTable.model_dump(**kwargs)1.2.9 plot
LinkTable.plot(**kwargs)Plot the links of the model.
1.2.9.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| **kwargs | Dict | Supported: ‘ax’, ‘color_flow’, ‘color_control’, ‘color_listen’, ‘color_observation’ | {} |
1.2.10 read
LinkTable.read()Read the data for this Table from disk.
Required when this Table was lazily loaded, otherwise it will either overwrite (reset) the existing data in the underlying DataFrame.
1.2.11 sort
LinkTable.sort()1.2.12 tablename
LinkTable.tablename()Retrieve tablename based on attached Schema.
NodeSchema -> Node TabularRatingCurveStaticSchema -> TabularRatingCurve / static
1.2.13 tableschema
LinkTable.tableschema()Retrieve Pandera Schema.
The type of the field df is known to always be an DataFrame[TableT]]] | None
1.2.14 write
LinkTable.write()Write the data for this Table to disk.