@leriomaggio | vmaggio_at_fbk_dot_eu |
This tutorial will use Python 3
This tutorial requires the following packages:
-
Python version 3.6
- Python 3.4+ should be fine as well
- likely Python 2.7 would be also fine, but who knows? :P
-
matplotlib==2.2.3
-
networkx==2.1
-
pandas==0.23.0
-
hiveplot==2017.10.17.21.7
-
nxviz==0.5.0
-
numpy==1.14.3
-
jupyter==1.0.0
-
scipy==1.1.0
-
python-louvain==0.11
If you have the Anaconda distribution of Python 3 installed on a Unix-like machine (Linux, macOS, etc.), then run make conda
, which wraps the commands below.
$ conda env create -f environment.yml
$ source activate nams
$ python checkenv.py
If you do not have the Anaconda distribution, I would highly recommend getting it for Windows, Mac or Linux. It provides an isolated Python computing environment that will not interfere with your system Python installation, and comes with a very awesome package manager (conda
) that makes installation of new packages a single conda install pkgname
away.
For those who do not have the capability of installing the Anaconda Python 3 distribution on their computers, please follow the instructions below.
Run make venv
, which wraps up the commands below.
- Create a virtual environment for this tutorial, so that the installed packages do not mess with your regular Python environment.
$ pip install virtualenv
$ virtualenv mscx
$ source mscx/bin/activate
$ pip install matplotlib networkx pandas hiveplot numpy jupyter
Open a Terminal, and import the required packages:
$ pythoh
>>> import numpy as np
>>> import scipy as sp
>>> import networkx as nx
>>> import matplotlib.pyplot as plt
>>> import community
...
Just to name a few.... :)
- Jon Charest's use of Circos plots to visualize networks of Metal music genres. [blog post][5] | [notebook][6]
- Gain further practice by taking this course online at DataCamp!
- A gentle introduction to graph theory on Vaidehi Joshi's website