Posts by: Lulu

INTERACTIVE BRAIN GRAPH VISUALIZATION: overview

INTERACTIVE BRAIN GRAPH VISUALIZATION: overview

This is a EPFL semester project doing visualization brain activity information with supervision by Benjamin Ricaud in Signal Processing Laboratory 2(http://lts2www.epfl.ch/) All the codes are open sourced and are available in my github:https://github.com/astro1860/visualization_project Tools I used for this project: – Ipython: command shell for interactive computing (http://ipython.org/) – Networkx: a Python language software package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks. (http://networkx.github.io/) – other libraries for scientific computing: SciPy, NumPy etc. – d3.js : Javascript library for manipulating documents based on data  (http://d3js.org/) Brief Introduction: The raw data used for visualization is…

Interactive Brain Graph Visualization (8): social network visualization

Interactive Brain Graph Visualization (8): social network visualization

Note: All the codes are available at my github https://github.com/astro1860/visualization_project To run it, go to the folder /social_fb_art and /social_fb_names and run the html with json file. Following the article  http://www.packtpub.com/article/visualizing-my-social-graph-with-d3-js, I extracted my friends network csv file via this tool https://apps.facebook.com/netvizz/. Afterwards, using similar visualization methods in Interactive Brain Graph Visualization (5) , I did the following layout: It is quite interesting to notice there are three branch of clusters, which are actually my friends in EPFL, my exchange university in Sweden and also my bachelor university in China. For a more artistic visualization, I did this layout:

Interactive Brain Graph Visualization (7): force-directed layout with centrality information

Interactive Brain Graph Visualization (7): force-directed layout with centrality information

Note: all the codes are available at my github https://github.com/astro1860/visualization_project/tree/master/brain_info  To  run it, go to /brain_fisheye folder and copy the .json and .ipynb file and put them into the same folder. Since we have calculated centrality informations in Interactive Brain Graph Visualization(4): From fMRI to json file, we would like to display the information in the visualization. Moreover, as the value of centrality represent the importance of a node in the network, we also need to perform a ranking of this information. In the following, we will go through the process of how to construct an integrated interface. To look at…

Interactive Brain Graph Visualization (6): force-directed layout with position information

Interactive Brain Graph Visualization (6): force-directed layout with position information

Note: All the codes are available in my Github: https://github.com/astro1860/visualization_project/tree/master/brain_opacity  The demo of this visualization is here: http://www.luhangxin.info/uncategorized/brain_vis_pos/ ‎ The force-directly layout placed the position of nodes using Verlet integration and applied a quadtree to accelerate charge interaction using Barnes-Hut approximation. As our json file included the position data, we would like to figure out a way place the node with the position data. Compared to the simple layout we developed previously, we would like to add more features in this layout: – Position of nodes represents x,y coordinates in the json file. – Labels of nodes are visible. – Colored nodes representing…

Interactive Brain Graph Visualization (5): Force-directed layout with fisheye distortion

Interactive Brain Graph Visualization (5): Force-directed layout with fisheye distortion

Note: All the codes are available in my Github https://github.com/astro1860/visualization_project/tree/master/brain_fisheye In this section, we are going to visualize with a powerful tool: D3.js. D3.js is a JavaScript library for manipulating documents based on data using HTML, SVG and CSS.http://d3js.org/ We would like to manipulating the json file we just created with a force-directed layout and also with fisheye distortion. Providing the reference of force layout documentation https://github.com/mbostock/d3/wiki/Force-Layout, we can easily construct the javascript code. A flexible force-directed graph layout implementation using position Verlet integration to allow simple constraints. This implementation uses a quadtree to accelerate charge interaction using the Barnes–Hut approximation. In addition to the repulsive charge force, a pseudo-gravity force keeps nodes centered in the…

Interactive Brain Graph Visualization(4): From fMRI to Json file

Interactive Brain Graph Visualization(4): From fMRI to Json file

The code of this visualization is available on my github: https://github.com/astro1860/visualization_project/tree/master/brain_fisheye  and you can see how to generate the json file by running the ipynb file. Getting data from fMRI The raw data used for visualization is obtained from fMRI(functional magnetic resonance imaging), using MRI with diffusion tensor imaging and tractography techniques. As the fMRI data can indicate activity of different brain areas, these data can be used to represent the brain and its connections as a graph. In the visualization, each node is a brain region of the Desikan-Killiany Atlas. Each link illustrates the connection between two brain regions. The data is read from…

Interactive Brain Graph Visualization (3): simple graph visualizations with random graph

Interactive Brain Graph Visualization (3): simple graph visualizations with random graph

The code of this visualization is available on my github:  https://github.com/astro1860/visualization_project/tree/master/random_graph_dynamic In this part, we tried to visualize with different technique with random graph. Firstly, we generated a 50 nodes random graph by networkx and we got the following graph. import networkx as nx from networkx.readwrite import json_graph from operator import itemgetter import json import community import matplotlib.pyplot as plt import scipy as sp import numpy as np import scipy.io as spio G=nx.random_geometric_graph(50,0.25) # position is stored as node attribute data for random_geometric_graph pos=nx.get_node_attributes(G,’pos’) # find node near center (0.5,0.5) dmin=1 ncenter=0 for n in pos: x,y=pos[n] d=(x-0.5)**2+(y-0.5)**2 if d<dmin:…

Interactive Brain Graph Visualization (2): simple graph visualizations with barbell graph

Interactive Brain Graph Visualization (2): simple graph visualizations with barbell graph

What is barbell graph? Barbell graph are two completes graph connected by a path, which is shown in figure 1. In a barbell graph, nodes in connecting path have more degrees than others, thus they are more popular. Moreover, the nodes also have larger eigenvalues of others, thus they are more important.   Compute centrality with Networkx We firstly generate a barbell graph using G=nx.barbell_graph(6, 3, create_using=None). Two identical complete graph(with 6 nodes on each sides) form the left and right bells, and are connected by a path(with 3 nodes). We plot it in networkx, shown in figure 2. We…

Interactive Brain Graph Visualization (1):  Network analysis

Interactive Brain Graph Visualization (1): Network analysis

Let’s don’t rush into the coding part. Firstly, take a look at the network analysis. 1. What is a graph? In graph theory, a graph is a representation of  a set of objects where some pairs of objects are connected by links.It is a set of entities (aka vertices or nodes) and the connections (aka edges, links, or ties) among them. There may be an edge between every pair of nodes, no edges at all, or anything in between. You could refer to wikipedia of graph or this lecture note.  2.  Network analysis: Centrality Let’s Assume a graph of social web connections. People are nodes in…

1 of 2
12