Skip to content

Is it posssible to report the Tag value of a node or link? #254

Answered by aerispaha
bowguy asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @bowguy, what you're trying to do makes a lot of sense. I could see this being useful in several situations.

Currently, the swmmio.elements.Links object won't do this out of the box for us though. The main reason is the quirk in the [TAGS] section of the INP file in which the first column stores the Element Type (e.g. Link, Node). However, there is a fairly painless work around to achieve what I think you're after. We can join the [TAGS] dataframe after creating Links dataframe. I'll use the streets example model to demonstrate what I mean:

import swmmio
from swmmio.examples import streets

# get a dataframe of tags using the inp object
tags = streets.inp.tags

# to make this easy to …

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@bowguy
Comment options

@aerispaha
Comment options

@bemcdonnell
Comment options

@bowguy
Comment options

Answer selected by bowguy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants