Categories
Uncategorized

MySQL Node Matrix – Python

This will create either a directed or an undirected matrix on a MySQL data base. The edges are written as tuples, like this Where the first item in the tuple is the from node, the second item is the to node, and the third item is the weight of the edge. Here is the code […]

Categories
Uncategorized

Colouring Clusters – Python

The Graph file The Python bit The Graph

Categories
data science

Colouring Nodes According to Centrality – R

This R function will draw a graph and then colour the nodes according to centrality. There are three colours, red for high centrality, purple for medium centrality, and blue for low centrality. Node centrality was calculated using the betweenness( ) function in the igraph R library. It was then normalised manually so that we are […]