webweb: a tool for creating, displaying, and sharing interactive network visualizations on the web


webweb is a package for creating interactive and portable visualizations of complex networks in the web browser that can be easily shared. With webweb, users of MATLAB, pure Python, and Python’s networkX (Aric A. Hagberg & Pieter J. Swart, 2008) are able to write complex network data directly to a dependency-free html file. When opened in a browser, this file’s embedded javascript functions render both an interactive network visualization and a lightweight user interface, allowing solo users to visualize and explore their data, or easily share their visualizations with collaborators with a single file. The style of webweb’s network visualization is called a force-directed layout, which renders each network node as a circle, each network link as a line, and uses simulated forces to spread nodes apart while keeping linked nodes near each other. Although numerous existing software packages (Bastian, Heymann, & Jacomy, 2009) (Shannon, 2003) and libraries (“Netwulf,”2018) (Bostock, Ogievetsky, & Heer, 2011) are capable of creating such layouts, webweb fits uniquely into this space for three reasons. First, its output is a single html file, making it viewable in any OS and browser capable of rendering html and javascript, without installation of software or libraries. Second, its visualizations are dynamic, explorable, and customizable within the web browser. Third, it can be driven entirely in Python or MATLAB, and can conveniently handle many common types of network data. In addition to visualizing networks, webweb allows users to color or size a network’s nodes by metadata attributes, including scalar, boolean, and categorical values. Networks can be weighted or unweighted, and the stroke width of the network can reflect link weights via one of the html checkboxes in the interface. While all display options can be user-adjusted in the browser via the UI, all display option defaults can also be set from the Python or MATLAB code. Extensive examples and a complete list of API-accessible display options are provided on the documentation website. webweb is intended for network scientists who may or may not programmers. Its API is structured to support a wide range of inputs formats (edge lists, adjacency matrixes, vectorized and JSON-object style metadata), and it behaves intelligently when given ambiguous inputs.

MIDAS Network Members