Skip to content

Visualizing the network with the WeatherMap Class

tim-fiola edited this page Jan 5, 2021 · 1 revision

The WeatherMap class beta feature provides an interactive visualization of the network.

Additional packages needed to use WeatherMap Class

The WeatherMap class is a beta feature and requires two additional packages to be installed.

pip3 install dash
pip3 install dash-cytoscape

These packages are not part of the requirements for the general pyNTM package install. These must be explicitly installed.

Sample Use Of WeatherMap Class

Below is a simple example for use as a script called by python3. The 'model_test_topology_multidigraph' file is available here.

WeatherMap is a beta feature. It currently requires import from pyNTM.weathermap. It also requires explicit installation of the dash and dash-cytoscape packages.

from pyNTM import FlexModel
from pyNTM.weathermap import WeatherMap  # notice the import is from pyNTM.weathermap instead of directly from pyNTM

model = FlexModel.load_model_file('model_test_topology_multidigraph.csv')

vis = WeatherMap(model)

vis.create_weathermap()

Known Issues With WeatherMap

  • Requires explicit install of dash and dash-cytoscape packages.

This all has to do with my CI/CD environment not accepting the install of the dash and dash-cytoscape packages.

At this time I am attempting to get my CI/CD environment to accept the install of the dash and dash-cytoscape packages.

Clone this wiki locally