Primarily, analysis of general networks using graph theory. In particular, social network analysis. Less commonly, refers to packet sniffing with tools like Wireshark.
Questions tagged [network-analysis]
392 questions
23
votes
2 answers
Cannot create a directed graph using from_pandas_dataframe from networkx
I'm learning networkx library and use twitter retweet directed graph data.
I first read the datasets into pandas df (columns are 'from','to','weight') and wanted to put a first 300 rows(retweet) into a graph using below code:
tw_small =…

user3368526
- 2,168
- 10
- 37
- 52
16
votes
3 answers
WireShark doesn't decode gzip'ed http traffic on Windows
Do you guys know why WireShark may refuse to decode gzip'ed http traffic on Windows?
My configuration
WireShark 1.8.3
Windows 7 Ultimate x64
WinPcap 4.1.2
Option "Uncompressed entity bodies" is checked in Preferences / Protocols / HTTP.
Here is…

expert
- 29,290
- 30
- 110
- 214
15
votes
4 answers
How to efficiently calculate triad census in undirected graph in python
I am calculating triad census as follows for my undirected network.
import networkx as nx
G = nx.Graph()
G.add_edges_from(
[('A', 'B'), ('A', 'C'), ('D', 'B'), ('E', 'C'), ('E', 'F'),
('B', 'H'), ('B', 'G'), ('B', 'F'), ('C', 'G')])
from…

EmJ
- 4,398
- 9
- 44
- 105
12
votes
1 answer
Gephi not showing Nodes & Edges on graph
It's been awhile since I've used Gephi, but I used to be pretty familiar with everything in v 0.8.xx.
I just loaded node & edge files into a brand-new installation of v0.9.0. They show up fine in the data lab & the context menu shows they exist.…

CCapra
- 139
- 1
- 1
- 4
9
votes
1 answer
Using geo-coordinates as vertex coordinates in the igraph r-package
In the igraph package for R, I am struggling to plot a social network using latitude/longitude coordinates as the layout of the graph.
Imagine this simple example: a network with 4 nodes of which you know the geographical location and the…

willemr
- 93
- 1
- 4
9
votes
2 answers
Changing node/vertice opacity in iGraph in R
I have a network that, when I plot it, has a number of overlapping nodes. I want to change the opacity of the colors so that you can see nodes underneath others when they overlap. As an example, see this video: https://vimeo.com/52390053
I'm using…

Net20
- 105
- 1
- 5
8
votes
1 answer
igraph - Neighbors as subgraph - make_ego_graph() as single graph
I'd like to construct a subgraph of a graph of a directed network with all the vertices sharing a certain vertex attribute (say, V(Grph)$year == "1952") and their first-order (immediate) neighbors, based only on the out-degree.
I've tried ego(),…

user5835099
- 127
- 1
- 8
7
votes
1 answer
Modifying a multilayer network plot in pymnet
I want to visualise a multilayer network using pymnet. The example in the package's documentation shows how to plot a multilayer network (left-hand side of the plot below) but I would like to add another layer (orange) that would be displayed at a…

epo3
- 2,991
- 2
- 33
- 60
7
votes
1 answer
Show only specific labels on network graph using igraph in R
I'm trying to plot a graph that only displays the labels for certain vertices. In this case, I want to only display labels for vertices with a certain number of edges.
I'm reading vertices and edges into the graph object like so:
nodes <-…

tchaymore
- 3,728
- 13
- 55
- 86
7
votes
1 answer
Making igraph clearer to read
I have a directed igraph with 69 vertices, shown below. It was plotted using the igraph package:
library(igraph)
ig <- graph.adjacency(data, mode="directed", weighted=TRUE)
plot(ig)
I'm looking to achieve the following 2 things:
(a) Space the…

user2846211
- 949
- 6
- 16
- 24
6
votes
1 answer
Using R package sfnetworks to subset river network that is upstream of a given node
I'm experimenting with using the sfnetworks package to query river networks. Specifically, I'd like to subset upstream portions of a river network relative to any given site.
I have a small river network dataset (available here) that I can convert…

mbcaradima
- 251
- 2
- 11
5
votes
1 answer
What can cause different results in communities detected after scaling edge weights of a graph with python-louvain?
I noticed that if I change all the edge weights in the graph with the same value, community.best_partition doesn't always result in the same communities.
I used the same random state in all cases and the graph is exactly the same just that instead…

Magda Anastasiadou
- 71
- 4
5
votes
3 answers
How to create an edge list from pandas dataframe?
I have a pandas dataframe (df) of the form-
Col1
A [Green,Red,Purple]
B [Red, Yellow, Blue]
C [Brown, Green, Yellow, Blue]
I need to convert this to an edge list i.e. a dataframe of the form:
Source Target Weight
A B …

Melsauce
- 2,535
- 2
- 19
- 39
5
votes
1 answer
Sorting nodes according to degree and manipulating in R using igraph
the datasets I am working with shows links between nodes.For Example:
> data2
V1 V2
1 10000 4725
2 4725 6805
3 4725 3250
4 5725 3250
5 1725 7673
(Using a small dataframe for example).Here the dataframe says that there is an undirected link…

Kitne
- 53
- 1
- 4
5
votes
3 answers
build word co-occurence edge list in R
I have a chunk of sentences and I want to build the undirected edge list of word co-occurrence and see the frequency of every edge. I took a look at the tm package but didn't find similar functions. Is there some package/script I can use? Thanks a…

leoce
- 715
- 1
- 8
- 24