-
Graph Files: Contains Gephi graph files for positive and negative edges.
- positive_edges.gephi: Gephi graph file for positive edges.
- negative_edges.gephi: Gephi graph file for negative edges.
-
Screenshots: Contains screenshots of node-link diagrams for both positive and negative edges.
-
Data: Contains pre-processed CSV files.
- positive_edges.csv: CSV file for positive edges.
- negative_edges.csv: CSV file for negative edges.
- nodes.csv: CSV file containing node information.
-
IPython Notebook for data preprocessing:
This dataset represents a network of politicians speaking in the United States Congress. Nodes are politicians, and directed edges denote one politician mentioning another. Edge weights represent whether the mention is in support (positive weight) or opposition (negative weight). Parallel edges and self-loops are allowed.
-
Loading Data:
- Load the dataset from
data.convote
. - Extract tuples of (Source, Target, Weight).
- Load the dataset from
-
Separating Positive and Negative Edges:
- Create separate DataFrames for positive and negative edges.
-
Grouping and Summing:
- Group positive edges by source and target nodes, summing weights.
- Group negative edges similarly, negating the weights.
-
CSV Export:
- Export positive and negative edge DataFrames to CSV files.
- Export node information to a CSV file.
-
Creating Node-Link Diagrams:
- Two node-link diagrams are created to visually represent the network based on the nature of interactions between politicians.
- Positive Edges Diagram:
- Represents instances where a speaker is mentioned in support of another.
- Positive edge weight implies support.
- Negative Edges Diagram:
- Represents instances where a speaker is mentioned in opposition to another.
- Negative edge weight implies opposition.
- Positive Edges Diagram:
- Two node-link diagrams are created to visually represent the network based on the nature of interactions between politicians.
-
Install Gephi:
- Download and install Gephi from Gephi's official website.
-
Importing Positive Edges:
- Open Gephi.
- File > Open Project > Select
positive_edges.gephi
. - Explore and visualize positive edges using various layout algorithms.
-
Importing Negative Edges:
- Open Gephi.
- File > Open Project > Select
negative_edges.gephi
. - Explore and visualize negative edges using various layout algorithms.
Feel free to explore different layout algorithms in Gephi to understand the network structure better.