O'Reilly logo

JUNOS Automation Cookbook by Adam Chappell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Visualizing graphs

In this recipe, we'll build a generic utility function for taking a graph (in other words a network of nodes and links), and representing it on an HTML canvas so that it can be viewed in a web browser. We'll create a Python application, render-graph.py, that will take as input a JSON representation of a graph and output a completed HTML page that renders the graph and allows user manipulation.

Combining graph data with HTML template to produce interactive map

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required