SlideShare a Scribd company logo
UP AND RUNNING WITH
NETWORK GRAPHS
Connections
Sarah Cullem
Inspiration
Node Edge
Systems of nodes and
edges that form a
structured representation
of connected things and
how they are related
What is a network graph?
Node Edge
Edges can have weight that
describes the strength of a
relationship
What is a network graph?
Node Edge
Edges can be lines
(undirected graphs) or
arrows (directed graphs)
What is a network graph?
Node Edge
Nodes can vary in size
based on the degree of
their relationships to other
nodes
What is a network graph?
Node Edge
Nodes can vary in color
based on selected
attributes
What is a network graph?
Network graphs allow you to visualize
patterns in complex, multidimensional data
Who/what is the most central in the network?
How strong are the connections between nodes?
What is the shortest path between nodes?
Are there communities within the larger network?
How dense is the network?
Who/what is the most influential?
Micro vs. Macro
Level
Static vs.Time
Series
Social Semantic Geographic
One vs. Many
Dimensions
Types of Relationships
Analytical Decisions
Graph Type: Directed
Nodes: Girls in a 1960s dormitory
Edges: 1st & 2nd choices when asked which other girls
they liked best as their dining partners
http://www.slideshare.net/ValaAliRohani/social-network-analysis-part-1-40046689
Graph Type: Undirected
Nodes: Adverse drug reactions in instagram posts
Edges: Co-occurrence of adverse reactions to drugs
treating depression
http://psb.stanford.edu/psb-online/proceedings/psb16/brattigcorreia.pdf
http://truthy.indiana.edu/highlights/
Social Butterflies or Frequent Fliers?
Twitter trends follow similar patterns as epidemics, diffusing across the
country along the same pathways as human travelers
And now for an example using the
CongressionalVoting Records dataset
https://archive.ics.uci.edu/ml/datasets/Congressional+Voting+Records
Type: Undirected Graph
Nodes: Names of bills and party affiliation
Edges: Every pairing of “yes” on bills or
party affiliation
Weight: # of times each bill-bill or bill- party
pairing appears as “yes” together
Example 1:Which bills share common
voters/parties?
Education Religious Republican Democrat
Voter A Yes Yes Yes No
Voter B NotYes Yes No Yes
Voter C Yes NotYes Yes No
Voter D NotYes NotYes No Yes
Our initial dataset consists of each voter, their
vote on each bill, and their party affiliation
Note: Using “NotYes” for bills instead of “No” because data set contains cases of “?” where the vote was neither “yes” nor “no”
Education Religious Republican Democrat
Voter A 1 1 1 0
Voter B 0 1 0 1
Voter C 1 0 1 0
Voter D 0 0 0 1
We recode all “Yes” votes to 1 and “No/Not
Yes” votes to 0
Note: Using “NotYes” for bills instead of “No” because data set contains cases of “?” where the vote was neither “yes” nor “no”
Education Religious Republican Democrat
Voter A 1 1 1 0
Voter B 0 1 0 1
Voter C 1 0 1 0
Voter D 0 0 0 1
Nodes
Education
Religious
Republican
Democrat
Our nodes are the bill and party
“tags” for each voter
Edges Weights
Education, Religious
Education, Republican
Education, Democrat
Religious, Republican
Religious, Democrat
Republican, Democrat
Our edges are all possible
“bill-bill” and “bill-party”
combinations in the dataset
Education Religious Republican Democrat
Voter A 1 1 1 0
Voter B 0 1 0 1
Voter C 1 0 1 0
Voter D 0 0 0 1
Edges Weights
Education, Religious
Education, Republican
Education, Democrat
Religious, Republican
Religious, Democrat
Republican, Democrat
Our weights are the
number of times our
nodes/tags occur together
Education Religious Republican Democrat
Voter A 1 1 1 0
Voter B 0 1 0 1
Voter C 1 0 1 0
Voter D 0 0 0 1
Education Religious Republican Democrat
Voter A 1 1 1 0
Voter B 0 1 0 1
Voter C 1 0 1 0
Voter D 0 0 0 1
Edges Weights
Education, Religious 1
Education, Republican 2
Education, Democrat 0
Religious, Republican 1
Religious, Democrat 1
Republican, Democrat 0
There is one case where a
voter voted “yes” on
Education and on Religious
Education Religious Republican Democrat
Voter A 1 1 1 0
Voter B 0 1 0 1
Voter C 1 0 1 0
Voter D 0 0 0 1
There are two cases where a
voter was Republican and also
voted “yes” on Education
Edges Weights
Education, Religious 1
Education, Republican 2
Education, Democrat 0
Religious, Republican 1
Religious, Democrat 1
Republican, Democrat 0
Which bills share common voters/parties?
Network graph created with open source tool Gephi: https://gephi.org/
On average, 70% of
democrats and 20%
of republicans
voted yes
On average, 30% of
democrats and 79%
of republicans
voted yes
Network graph created with open source tool Gephi: https://gephi.org/
Network graph created with open source tool Gephi: https://gephi.org/
56% of democrats
and 56% of
republicans voted
yes
20% of democrats
and 89% of
republicans voted
yes
72% of democrats
and 14% of
republicans voted
yes
Do members of both parties vote together?
Network graph created with open source tool Gephi: https://gephi.org/
• My GitHub repo: https://github.com/scullem/network_graphs
• NetworkX python: https://networkx.github.io/
• NetworkX tutorial: https://github.com/sarguido/networkx-tutorial
• Gephi download: https://gephi.org/
• Sebastien Heymann Exploratory Network Analysis with Gephi
Part 1: https://www.youtube.com/watch?v=Y7Ah6VylIak
• Gephi guides: http://meta-guide.com/videography/100-best-gephi-
videos
• Graph Analysis andVisualization: Discovering Business
Opportunity in Linked Data: http://www.amazon.com/Graph-
Analysis-Visualization-Discovering-Opportunity-ebook/dp/
B00T1JQUQE
Resources

More Related Content

Similar to Network graph scullem

Grant Writing and Reporting
Grant Writing and ReportingGrant Writing and Reporting
Grant Writing and Reporting
Healthy City
 
Political Campaign Planning1
Political Campaign Planning1Political Campaign Planning1
Political Campaign Planning1
garneth87
 
03 Ego Network Analysis (2016)
03 Ego Network Analysis (2016)03 Ego Network Analysis (2016)
03 Ego Network Analysis (2016)
Duke Network Analysis Center
 
03 Ego Network Analysis
03 Ego Network Analysis03 Ego Network Analysis
03 Ego Network Analysis
dnac
 
What do we care about in a network by @phil_renaud
What do we care about in a network  by @phil_renaudWhat do we care about in a network  by @phil_renaud
What do we care about in a network by @phil_renaud
phil_renaud
 
Colorado Association of School Boards
Colorado Association of School BoardsColorado Association of School Boards
Colorado Association of School Boards
JohnCr8on
 
Quantitative Research
Quantitative ResearchQuantitative Research
Quantitative ResearchAllison Manzo
 
How to Influence Politicians and Win Elections for Libraries
How to Influence Politicians and Win Elections for LibrariesHow to Influence Politicians and Win Elections for Libraries
How to Influence Politicians and Win Elections for Libraries
Patrick "PC" Sweeney
 
Mainstream Gay Politicians Online
Mainstream Gay Politicians OnlineMainstream Gay Politicians Online
Mainstream Gay Politicians Online
David Lynn Painter
 
2016 Voter Insights - Millennials
2016 Voter Insights - Millennials2016 Voter Insights - Millennials
2016 Voter Insights - Millennials
Resonate
 
12Survey QuestionsDefinitionsCommunity service- a proje
12Survey QuestionsDefinitionsCommunity service- a proje12Survey QuestionsDefinitionsCommunity service- a proje
12Survey QuestionsDefinitionsCommunity service- a proje
EttaBenton28
 
12Survey QuestionsDefinitionsCommunity service- a proje
12Survey QuestionsDefinitionsCommunity service- a proje12Survey QuestionsDefinitionsCommunity service- a proje
12Survey QuestionsDefinitionsCommunity service- a proje
ChantellPantoja184
 
Are Twitter Users Equal in Predicting Elections? Insights from Republican Pri...
Are Twitter Users Equal in Predicting Elections? Insights from Republican Pri...Are Twitter Users Equal in Predicting Elections? Insights from Republican Pri...
Are Twitter Users Equal in Predicting Elections? Insights from Republican Pri...
Artificial Intelligence Institute at UofSC
 
Twitter Sentiment and Network Analysis
Twitter Sentiment and Network AnalysisTwitter Sentiment and Network Analysis
Twitter Sentiment and Network AnalysisXudong Brandon Liang
 
2-7 Swing voters- A 2012 Pew Research survey asked 2- 373 randomly sam.docx
2-7 Swing voters- A 2012 Pew Research survey asked 2- 373 randomly sam.docx2-7 Swing voters- A 2012 Pew Research survey asked 2- 373 randomly sam.docx
2-7 Swing voters- A 2012 Pew Research survey asked 2- 373 randomly sam.docx
KevinrDQBowerq
 
Unit 3: Review
Unit 3:  ReviewUnit 3:  Review
Unit 3: Reviewadutcher
 

Similar to Network graph scullem (20)

Grant Writing and Reporting
Grant Writing and ReportingGrant Writing and Reporting
Grant Writing and Reporting
 
Political Campaign Planning1
Political Campaign Planning1Political Campaign Planning1
Political Campaign Planning1
 
03 Ego Network Analysis (2016)
03 Ego Network Analysis (2016)03 Ego Network Analysis (2016)
03 Ego Network Analysis (2016)
 
03 Ego Network Analysis
03 Ego Network Analysis03 Ego Network Analysis
03 Ego Network Analysis
 
What do we care about in a network by @phil_renaud
What do we care about in a network  by @phil_renaudWhat do we care about in a network  by @phil_renaud
What do we care about in a network by @phil_renaud
 
Review slides
Review slidesReview slides
Review slides
 
Review slides
Review slidesReview slides
Review slides
 
Review slides
Review slidesReview slides
Review slides
 
Colorado Association of School Boards
Colorado Association of School BoardsColorado Association of School Boards
Colorado Association of School Boards
 
Quantitative Research
Quantitative ResearchQuantitative Research
Quantitative Research
 
Chapter8
Chapter8Chapter8
Chapter8
 
How to Influence Politicians and Win Elections for Libraries
How to Influence Politicians and Win Elections for LibrariesHow to Influence Politicians and Win Elections for Libraries
How to Influence Politicians and Win Elections for Libraries
 
Mainstream Gay Politicians Online
Mainstream Gay Politicians OnlineMainstream Gay Politicians Online
Mainstream Gay Politicians Online
 
2016 Voter Insights - Millennials
2016 Voter Insights - Millennials2016 Voter Insights - Millennials
2016 Voter Insights - Millennials
 
12Survey QuestionsDefinitionsCommunity service- a proje
12Survey QuestionsDefinitionsCommunity service- a proje12Survey QuestionsDefinitionsCommunity service- a proje
12Survey QuestionsDefinitionsCommunity service- a proje
 
12Survey QuestionsDefinitionsCommunity service- a proje
12Survey QuestionsDefinitionsCommunity service- a proje12Survey QuestionsDefinitionsCommunity service- a proje
12Survey QuestionsDefinitionsCommunity service- a proje
 
Are Twitter Users Equal in Predicting Elections? Insights from Republican Pri...
Are Twitter Users Equal in Predicting Elections? Insights from Republican Pri...Are Twitter Users Equal in Predicting Elections? Insights from Republican Pri...
Are Twitter Users Equal in Predicting Elections? Insights from Republican Pri...
 
Twitter Sentiment and Network Analysis
Twitter Sentiment and Network AnalysisTwitter Sentiment and Network Analysis
Twitter Sentiment and Network Analysis
 
2-7 Swing voters- A 2012 Pew Research survey asked 2- 373 randomly sam.docx
2-7 Swing voters- A 2012 Pew Research survey asked 2- 373 randomly sam.docx2-7 Swing voters- A 2012 Pew Research survey asked 2- 373 randomly sam.docx
2-7 Swing voters- A 2012 Pew Research survey asked 2- 373 randomly sam.docx
 
Unit 3: Review
Unit 3:  ReviewUnit 3:  Review
Unit 3: Review
 

Recently uploaded

原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
u86oixdj
 
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
u86oixdj
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
University of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma TranscriptUniversity of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma Transcript
soxrziqu
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
Nanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdfNanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdf
eddie19851
 
Intelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicineIntelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicine
AndrzejJarynowski
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
nuttdpt
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
roli9797
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
nyfuhyz
 
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
bopyb
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
Social Samosa
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
Sm321
 
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdfEnhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
GetInData
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
manishkhaire30
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
javier ramirez
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023
kuntobimo2016
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
g4dpvqap0
 

Recently uploaded (20)

原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
 
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
University of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma TranscriptUniversity of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma Transcript
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
Nanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdfNanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdf
 
Intelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicineIntelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicine
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
 
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
 
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdfEnhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
Enhanced Enterprise Intelligence with your personal AI Data Copilot.pdf
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
 

Network graph scullem

  • 1. UP AND RUNNING WITH NETWORK GRAPHS Connections Sarah Cullem
  • 3. Node Edge Systems of nodes and edges that form a structured representation of connected things and how they are related What is a network graph?
  • 4. Node Edge Edges can have weight that describes the strength of a relationship What is a network graph?
  • 5. Node Edge Edges can be lines (undirected graphs) or arrows (directed graphs) What is a network graph?
  • 6. Node Edge Nodes can vary in size based on the degree of their relationships to other nodes What is a network graph?
  • 7. Node Edge Nodes can vary in color based on selected attributes What is a network graph?
  • 8. Network graphs allow you to visualize patterns in complex, multidimensional data Who/what is the most central in the network? How strong are the connections between nodes? What is the shortest path between nodes? Are there communities within the larger network? How dense is the network? Who/what is the most influential?
  • 9. Micro vs. Macro Level Static vs.Time Series Social Semantic Geographic One vs. Many Dimensions Types of Relationships Analytical Decisions
  • 10. Graph Type: Directed Nodes: Girls in a 1960s dormitory Edges: 1st & 2nd choices when asked which other girls they liked best as their dining partners http://www.slideshare.net/ValaAliRohani/social-network-analysis-part-1-40046689
  • 11. Graph Type: Undirected Nodes: Adverse drug reactions in instagram posts Edges: Co-occurrence of adverse reactions to drugs treating depression http://psb.stanford.edu/psb-online/proceedings/psb16/brattigcorreia.pdf
  • 12. http://truthy.indiana.edu/highlights/ Social Butterflies or Frequent Fliers? Twitter trends follow similar patterns as epidemics, diffusing across the country along the same pathways as human travelers
  • 13. And now for an example using the CongressionalVoting Records dataset https://archive.ics.uci.edu/ml/datasets/Congressional+Voting+Records
  • 14. Type: Undirected Graph Nodes: Names of bills and party affiliation Edges: Every pairing of “yes” on bills or party affiliation Weight: # of times each bill-bill or bill- party pairing appears as “yes” together Example 1:Which bills share common voters/parties?
  • 15. Education Religious Republican Democrat Voter A Yes Yes Yes No Voter B NotYes Yes No Yes Voter C Yes NotYes Yes No Voter D NotYes NotYes No Yes Our initial dataset consists of each voter, their vote on each bill, and their party affiliation Note: Using “NotYes” for bills instead of “No” because data set contains cases of “?” where the vote was neither “yes” nor “no”
  • 16. Education Religious Republican Democrat Voter A 1 1 1 0 Voter B 0 1 0 1 Voter C 1 0 1 0 Voter D 0 0 0 1 We recode all “Yes” votes to 1 and “No/Not Yes” votes to 0 Note: Using “NotYes” for bills instead of “No” because data set contains cases of “?” where the vote was neither “yes” nor “no”
  • 17. Education Religious Republican Democrat Voter A 1 1 1 0 Voter B 0 1 0 1 Voter C 1 0 1 0 Voter D 0 0 0 1 Nodes Education Religious Republican Democrat Our nodes are the bill and party “tags” for each voter
  • 18. Edges Weights Education, Religious Education, Republican Education, Democrat Religious, Republican Religious, Democrat Republican, Democrat Our edges are all possible “bill-bill” and “bill-party” combinations in the dataset Education Religious Republican Democrat Voter A 1 1 1 0 Voter B 0 1 0 1 Voter C 1 0 1 0 Voter D 0 0 0 1
  • 19. Edges Weights Education, Religious Education, Republican Education, Democrat Religious, Republican Religious, Democrat Republican, Democrat Our weights are the number of times our nodes/tags occur together Education Religious Republican Democrat Voter A 1 1 1 0 Voter B 0 1 0 1 Voter C 1 0 1 0 Voter D 0 0 0 1
  • 20. Education Religious Republican Democrat Voter A 1 1 1 0 Voter B 0 1 0 1 Voter C 1 0 1 0 Voter D 0 0 0 1 Edges Weights Education, Religious 1 Education, Republican 2 Education, Democrat 0 Religious, Republican 1 Religious, Democrat 1 Republican, Democrat 0 There is one case where a voter voted “yes” on Education and on Religious
  • 21. Education Religious Republican Democrat Voter A 1 1 1 0 Voter B 0 1 0 1 Voter C 1 0 1 0 Voter D 0 0 0 1 There are two cases where a voter was Republican and also voted “yes” on Education Edges Weights Education, Religious 1 Education, Republican 2 Education, Democrat 0 Religious, Republican 1 Religious, Democrat 1 Republican, Democrat 0
  • 22. Which bills share common voters/parties? Network graph created with open source tool Gephi: https://gephi.org/
  • 23. On average, 70% of democrats and 20% of republicans voted yes On average, 30% of democrats and 79% of republicans voted yes Network graph created with open source tool Gephi: https://gephi.org/
  • 24. Network graph created with open source tool Gephi: https://gephi.org/ 56% of democrats and 56% of republicans voted yes 20% of democrats and 89% of republicans voted yes 72% of democrats and 14% of republicans voted yes
  • 25. Do members of both parties vote together? Network graph created with open source tool Gephi: https://gephi.org/
  • 26. • My GitHub repo: https://github.com/scullem/network_graphs • NetworkX python: https://networkx.github.io/ • NetworkX tutorial: https://github.com/sarguido/networkx-tutorial • Gephi download: https://gephi.org/ • Sebastien Heymann Exploratory Network Analysis with Gephi Part 1: https://www.youtube.com/watch?v=Y7Ah6VylIak • Gephi guides: http://meta-guide.com/videography/100-best-gephi- videos • Graph Analysis andVisualization: Discovering Business Opportunity in Linked Data: http://www.amazon.com/Graph- Analysis-Visualization-Discovering-Opportunity-ebook/dp/ B00T1JQUQE Resources