You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For several use-cases, it would be useful to be able to discern the type of link in each row that is returned by the swmmio.Model.links.dataframe (and geodataframe). As discussed here, we will likely benefit from an additional Type column in the links (geo)dataframe.
A similar thing is true for the swmmio.Model.nodes dataframe.
Proposal
Add a new column to swmmio.Model.links.dataframe and swmmio.Model.links.geodataframe that encodes the type of link in each row (e.g. Conduit, Pump, Weir, etc.)
Considerations
Because this would be a special column, not derived from tabular data in the inp file, we should maybe consider a different style/syntax for the column name. Perhaps snake cased link_type
We should be sure that this column doesn't clash with any existing column names. To achieve this, we might consider prepending the column name with dunders or a special swmmio_ string.
We could also consider multi-indexing these dataframes, adding a link type index dimension. I expect this might cause some ripple effects though
The text was updated successfully, but these errors were encountered:
@aerispaha, I agree that it would be nice to be able to get the link or node type from the dataframe / geodataframe associated with swmmio.Model.links and swmmio.Model.nodes. One note is that I have noticed that sometimes the Type column does appear in the swmmio dataframe. I am not sure in what cases the Type column shows up (e.g., difference between SWMM, PCSWMM, etc.). I like the idea of creating a special column naming convention to avoid potential naming conflicts.
For several use-cases, it would be useful to be able to discern the type of link in each row that is returned by the
swmmio.Model.links.dataframe
(and geodataframe). As discussed here, we will likely benefit from an additionalType
column in thelinks
(geo)dataframe.A similar thing is true for the
swmmio.Model.nodes
dataframe.Proposal
Add a new column to
swmmio.Model.links.dataframe
andswmmio.Model.links.geodataframe
that encodes the type of link in each row (e.g. Conduit, Pump, Weir, etc.)Considerations
inp
file, we should maybe consider a different style/syntax for the column name. Perhaps snake casedlink_type
swmmio_
string.The text was updated successfully, but these errors were encountered: