I’ve been playing around with visjs recently using Python to the graph then just writing the data to an HTML template using jinja. One of my test cases was to try and map out PEPs in some meaningful way. If you’re interested in checking it out, I have a rough draft up here.
The current layout is all PEPs marked Active, Accepted, or Final. Each author gets a node that is sized based on the number of PEPs they have authored/co-authored and the edges are the PEPs themselves (you can double click them to open the PEP).
I’ve got some basic filtering so you can select authors and see their relations to other PEP authors as well as select PEPs to see how connected a chosen group of PEPs is by author.
Would definitely like some feedback, I ended up writing a lot of stuff manually for this, but my goal is to have a simple script that can generate this kinda graph with command line parameters.
EDIT: I did also remove PEP 733 due to the author count being so high. It was making it difficult to read.
Neat! I struggled a bit with filtering to multiple authors; maybe I’m doing something wrong? I typed in one name, selected it, and that was fine (the person I chose in the middle, and all their connections radiating out). Then started typing a second name, selected it, and it added another filter node, but also added the partial name that I’d selected, and said it couldn’t find anyone. Deleting the partial name reset it to showing everyone. I tried multiple times and sometimes it succeeded, other times it failed, so I’m guessing I’m doing something wrong.
Anyhow, what I was envisioning was a fun “six degrees of separation” challenge. Pick two people who’ve never directly collaborated - say, Tim Peters and Steven D’Aprano - and load them up. You should get two unconnected graphs. Then see how few nodes you need to add in order to link the graphs! In that example, there’s only one possible collaborator to add - Brandt Bucher - who has worked with Guido who has worked with Tim.
Just updated it. Navigation should be a bit easier now.
I also hide the labels until you mouse over.
Controls:
Single Click:
Node: Add Author to filter
Edge: Add PEP to filter
NOTE: Author and PEP are exclusive, so the other will be cleared
Double Click:
Edge: Open PEP
Canvas: Reset filters
And yeah I was having fun with it that way earlier lol. I actually have a function in my little graph library that generates the “7 degrees of Kevin Bacon” for you:
Yup. I can take “credit” for having helped out with PEP 572, one of the most controversial proposals ever. I’m sure that looks good on my resume…
I do have other connections, but those PEPs have other statuses than the three you filtered to, so they don’t show here. How messy does the graph become if you include all PEPs, regardless of status?
No probs! And I appreciate it Developing on prod is always fun.
Thanks for the unfiltered one, that’s good fun. Removing all filters makes a fascinating graph with a massive PEP 733 cluster, but also another cluster formed by packaging PEPs with authors who have been heavily involved in PyPI and pip. (Actually the packaging cluster is probably visible on the “accepted only” graph too, but it’s perhaps overshadowed by some others.)
It’s pretty interesting to see the clusters that are removed from the main group, usually a team that authors one big PEP together. I had to include self references on single author PEPs so they’d show up too.
I have another one I was playing with that orders all the Final PEPs into a chain and then connects the ones that are replaced by another one. It’s interesting how that one ends up looping back on itself.
(I’ll upload it later and share it with you here if you want).