-
Notifications
You must be signed in to change notification settings - Fork 13.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detecting loops in Sankeys #271
Conversation
|
recs = df.to_dict(orient='records') | ||
seen = set() | ||
hierarchy = {row['source']: row['target'] for row in recs} | ||
def find_loop(source, target): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might just be me but comments might make this a little more readable. not huge deal.
super nice add / nice debugging! LGTM overall, though I can't tell if the failed tests were intentional or not. Detecting sankey loops seems like a good opportunity for a test(s). |
Yeah I'm confused, apparently there's a loop in the example, but how does it still work then! I'll have to dig deeper |
see the slack channel for another example of a broken sankey, cc-ed you. |
d983413
to
dc48468
Compare
@williaster