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]
276 questions
17
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 =…
![](../../users/profiles/3368526.webp)
user3368526
- 1,612
- 7
- 27
- 43
16
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…
![](../../users/profiles/10704050.webp)
EmJ
- 3,959
- 2
- 20
- 68
14
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…
![](../../users/profiles/226895.webp)
expert
- 26,897
- 27
- 105
- 198
10
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.…
![](../../users/profiles/4888970.webp)
CCapra
- 119
- 1
- 1
- 4
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(),…
![](../../users/profiles/5835099.webp)
user5835099
- 107
- 1
- 8
8
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…
![](../../users/profiles/4828731.webp)
willemr
- 83
- 1
- 4
7
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…
![](../../users/profiles/4925122.webp)
Net20
- 85
- 1
- 5
6
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…
![](../../users/profiles/936420.webp)
epo3
- 2,573
- 1
- 29
- 51
6
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…
![](../../users/profiles/2846211.webp)
user2846211
- 869
- 5
- 16
- 24
5
votes
0 answers
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 to the same communities.
I used the same random state in all cases and the graph is exactly the same just that instead…
![](../../users/profiles/9847293.webp)
Magda Anastasiadou
- 61
- 3
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 …
![](../../users/profiles/5858873.webp)
Melsauce
- 2,005
- 2
- 14
- 32
5
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 <-…
![](../../users/profiles/321838.webp)
tchaymore
- 3,508
- 12
- 44
- 84
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…
![](../../users/profiles/5075992.webp)
Kitne
- 53
- 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…
![](../../users/profiles/1907154.webp)
leoce
- 613
- 7
- 20
4
votes
1 answer
CDF to test the distribution of nodes in R
Hi I'm struggling to get a CDF plot from a function in R.
Context:
I've produced a graph and done a log-log plot of the degree distribution of the nodes, which seems to follow a power-law. But I want to do the CDF on a log scale as an added…
![](../../users/profiles/9418497.webp)
pandanotp
- 41
- 8