Skip to content

Midnighter/rfn-analysis

Repository files navigation

Analysis of Flow Networks

Flow networks robust against damages are simple model networks described in a series of publications by Kaluza et al.[1, 2, 3].

This repository provides a series of Python scripts to extract relevant data from flow networks generated by code from a related repository and some R scripts for their analysis and plotting.

Installation

Please follow the relevant documentation for the installation of external packages.

This package can be installed like any other Python package but if you only use the extract_data.py script, it doesn't have to be.

sudo python setup.py install

Usage

If you don't want to make a system-wide installation, you can simply add the location of the package to the path variable.

import sys
sys.path.append("/home/you/location/rfn-analysis")
import rfn_analysis as ra

With the class definitions imported, you can unpickle the networks.

import networkx as nx
net = nx.read_gpickle("standard/node_robust/sim1025_final.pkl")

Requirements

Python:

R:

Optional:

  • extraction and storage of network characteristics in HDF5 files pytables
  • reading HDF5 files in R with rhdf5

References

About

Data extraction from and analysis of flow networks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published