Giter VIP home page Giter VIP logo

flowvisexample's Introduction

A simple use case of the flovwis package

For Info about how to Install flowvis, visit FlowVis

You can run the example as is simply by running the code below:

python visualize.py simple_scenario

This will create a folder 'plots' containing 4 different visualizations.

config.json

The content of this file is as follows:

{
  "colors": {
    "lc": "0.2",
    "tc": "black",
    "ec": "0.25",
    "uc": "blue",
    "pc": "yellow",
    "ex": "orange",
    "ac": "red",
    "wc": "yellow",
    "bc": "white"
  },
  "visualize_layout": true,
  "visualize_attack": true,
  "visualize_solution": true,
  "optimize_layout": true,
  "limit_dist_scale": 1,
  "max_segments": 1,
  "attractor": 10,
  "path_attractor": 22,
  "avg_dist": 0.7,
  "iterations": 1000,
  "minimal_control": true,
  "force_layout_show": false,
  "only_node_labels": false,
  "only_edge_labels": false,
  "node_scale": 1.5,
  "edge_scale": 1,
  "label_scale": 1,
  "edge_label_scale": 1.5,
  "node_label_scale": 1,
  "show_node_labels": true,
  "show_edge_labels": true,
  "show_edges": true,
  "with_node_ids": true
}

file_parser.py

The file_parser module should contain the functions capable to parse the content of the various input files. Given that it is likely that the structure of the input files will change, this module is intended to be adapted by the user so to correctly parse the data from the file. For more details about the structure of the parsed data have a look at each function in file_parser.py.

Note that

load_nodes(nodes_file)

and

load_edges(edges_file)

are the two functions that need to be defined to at least plot the basic layout of the network. If an attack scenario and the solutions should be visualized as well, then the following two functions need to be defined:

load_attack(attack_file)
load_solution(solution_file)

flowvisexample's People

Contributors

j-i-l avatar dedoco avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.