This visualization is pretty cool! I appreciate the example graph so we could easily see what is produced without running all the steps.
Our books have cross-deliverable links using peer maps (<mapref scope="peer">) with keyscopes. I have considered writing a script to extract a similar graph for book-to-book references, so we can see how our books - and thus our products - tend to reference each other. Your example gives me a great example of how the visualization part could work. I was originally going to create a static drawing using GraphViz, but I like this interactive VisJS approach better.
Thank you for sharing this!