Code Monkey home page Code Monkey logo

graphpass's Introduction

GraphPass

GraphPass in action

GraphPass is a helper library to filter networks and provide a default visualization output for Gephi or SigmaJS. It prevents the infamous "borg cube" result when entering large files into Gephi, allowing you to work with ready-made network layouts.

Installation

Dependencies

This library requires the C Igraph Library and a C compiler, such as gcc.

For Linux (Ubuntu):

Install the igraph dependencies:

sudo apt-get install git gcc libxml2-dev build-essential
wget http://igraph.org/nightly/get/c/igraph-0.7.1.tar.gz
tar -xvzf igraph-0.7.1.tar.gz
cd igraph-0.7.1
./configure
make
sudo make install
sudo ldconfig

You can test that gcc and igraph have been installed properly by using:

gcc -ligraph

If you get undefined reference to 'main' that means Linux is looking for graphpass and you are ready to go.

If you get cannot find -ligraph then something went wrong with the install.

Check through the logs to see what failed to install.

If desired remove the igraph directory:

cd ..
rm -rf igraph-0.7.1

For MacOS:

Using brew, the following commands will install dependencies:

brew install gcc
brew install igraph

Type

brew info igraph

and verify that the path displayed there matches the default IGRAPH_PATH value provided in the Makefile. By default this is /usr/local/Cellar/igraph/0.7.1_6/ for MacOS.

Building

Go to your preferred install directory, for example:

cd /Users/{USERNAME}/

Clone the repository with:

git clone https://github.com/archivesunleashed/graphpass

Then

cd graphpass
make

Usage

Once compiled use the following command:

./graphpass {FLAGS}

The following flags are available:

  • --file {FILENAME} - sets the default filename. If not set, graphpass will use a default network in /assets.
  • --dir {DIRECTORY} - the path to look for {FILENAME} by default this is assets/
  • --output {OUTPUT} - the directory to send output files such as filtered graphs and data reporst.
  • --percent {PERCENT} - a percentage to remove from the file. By default this is 0.0.
  • --method {options} - a string of various methods through which to filter the graph.

These various methods are outlined below:

  • a : authority
  • b : betweenness
  • d : simple degree
  • e : eigenvector
  • h : hub
  • i : in-degree
  • o : out-degree
  • p : pagerank
  • r : random

For example:

./graphpass --percent 10 --methods b --file links-for-gephi.graphml --output OUT/

Will remove 10% of the graph using betweenness as a cutting measure and lay the network out. It will find links-for-gephi.graphml file in /assets and output a new one to /OUT (titled links-for-gephi10Betweenness.graphml).

Optional arguments

  • --report or -r : create an output report showing the impact of filtering on graph features.
  • --no-save or -n : does not save any filtered files (useful if you just want a report).
  • --quick or -q : provides a "quickrun" for basic
  • --gexf or -g : output as a .gexf (e.g. for SigmaJS inputs) instead of .graphml.

Troubleshooting

It is possible that you can get a "error while loading shared libraries" error in Linux. If so, try running sudo ldconfig to set the libraries path for your local installation of igraph.

License

Licensed under the Apache License, Version 2.0.

Acknowledgments

This work is primarily supported by the Andrew W. Mellon Foundation. Additional funding for the Toolkit has come from the U.S. National Science Foundation, Columbia University Library's Mellon-funded Web Archiving Incentive Award, the Natural Sciences and Engineering Research Council of Canada, the Social Sciences and Humanities Research Council of Canada, and the Ontario Ministry of Research and Innovation's Early Researcher Award program. Any opinions, findings, and conclusions or recommendations expressed are those of the researchers and do not necessarily reflect the views of the sponsors.

The author would also like to thank Drs. Ian Milligan & Jimmy Lin plus Nick Nuest and Samantha Fritz for their kind advice and support.

graphpass's People

Contributors

greebie avatar ianmilligan1 avatar

Watchers

 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.