I stumbled upon this image representing deputies' voting patterns:
From what I understand, deputies with similar voting patterns would be placed closer on the graph.
Given I have tabular data with name
, vote
, and vote_id
columns, i) how do I create edges and nodes from it, ii) how do I create graph drawing from those edges and nodes?
I think I'll need to use networkx
module once I transform the data, but I'm not sure how to create connections first.
I'm sorry in advance if it's obvious, I only recently discovered network analysis.
Some sample data if that helps:
name vote vote_id
0 A yes 1
1 A yes 2
2 B no 1
3 B not voting 2
4 C not voting 1
5 C no 2
6 D yes 1
7 D no 2