SlideShare a Scribd company logo
(Social) Network Analysis
Scott A. Hale
Oxford Internet Institute
http://www.scotthale.net/
17 July 2014
What are networks?
Networks (graphs) are set of nodes (verticies) connected by edges (links,
ties, arcs)
What are networks?
Networks (graphs) are set of nodes (verticies) connected by edges (links,
ties, arcs)
Additional details
Whole vs. ego: whole networks have all
nodes within a natural boundary
(platform, organization, etc.). An ego
network has one node and all of its
immediate neighbors.
Edges can be directed or undirected and
weighted or unweighted
Additionally, networks may be multilayer
and/or multimodal.
Why?
Characterize network structure
How far apart / well-connected are nodes?
Are some nodes at more important positions?
Is the network composed of communities?
How does network structure affect processes?
Information diffusion
Coordination/cooperation
Resilience to failure/attack
A network
First questions when approaching a network
What are edges? What are nodes?
What kind of network?
Inclusion/exclusion criteria
Network data repositories
http://www.diggingintodata.org/Repositories/tabid/167/
Default.aspx
http://datamob.org
http://snap.stanford.edu/data
http://www-personal.umich.edu/~mejn/netdata
Python resources
tweepy: Package for Twitter stream and search APIs (only python 2.7 at
the moment)
search and stream API example code along with code to create
mentions/retweet network at
https://github.com/computermacgyver/twitter-python
Python two versions:
2.7.x – many packages, issues with non-English scripts
3.x – less packages, but excellent handling of international scripts
(unicode)
NetworkX
http://networkx.github.io/
Package to represent networks as python objects
Convenient functions to add, delete, iterate nodes/edges
Functions to calculate network statistics (degree, clustering, etc.)
Easily generate comparison graphs based on statistical models
Visualization
Alternatives include igraph (available for Python and R)
Gephi
Open-source, cross-platform GUI interface
Primary strength is to visualize networks
Basic statistical properties are also available
Alternatives include NodeXL, Pajek, GUESS, NetDraw, Tulip, and more
Network measures
With many nodes visualizations are often difficult/impossible to interpret.
Statistical measures can be very revealing, however.
Node-level
Degree (in, out): How many incoming/outgoing edges does a node have?
Centrality (next slide)
Constraint
Network-level
Components: Number of disconnected subsets of nodes
Density: observed edges
maximum number of edges possible
Clustering coefficient closed triplets
connected triples
Path length distribution
Distributions of node-level measures
Centrality measures
Degree
Closeness: Measures the average geodesic distance to ALL other nodes.
Informally, an indication of the ability of a node to diffuse a property
efficiently.
Betweenness: Number of shortest paths the node lies on. Informally,
the betweenness is high if a node bridges clusters.
Eigenvector: A weighted degree centrality (inbound links from highly
central nodes count more).
PageRank: Not strictly a centrality measure, but similar to eigenvector
but modeled as a random walk with a teleportation parameter
NetworkX: Nodes
import networkx as nx
g=nx.Graph() #A new (empty) undirected graph
g.add_node("Alan") #Add one new node
g.add_nodes_from(["Bob","Carol","Denise"])#Add three new nodes
#Nodes can have attributes
g.node["Alan"]["gender"]="M"
g.node["Bob"]["gender"]="M"
g.node["Carol"]["gender"]="F"
g.node["Denise"]["gender"]="F"
for n in g:
print("{0} has gender {1}".format(n,g.node[n]["gender"]))
NetworkX: Edges
#Interesting graphs have edges
g.add_edge("Alan","Bob") #Add one new edge
#Add two new edges
g.add_edges_from([["Carol","Denise"],["Carol","Bob"]])
#Edge attributes
g.edge["Alan"]["Bob"]["relationship"]="Friends"
g.edge["Carol"]["Denise"]["relationship"]="Friends"
g.edge["Carol"]["Bob"]["relationship"]="Married"
#New edge with an attribute
g.add_edges_from([["Carol","Alan",
{"relationship":"Friends"}]])
NetworkX: Edges
for e in g.edges_iter():
n1=e[0]
n2=e[1]
print("{0} and {1} are {2}".format(n1,n2,
g.edge[n1][n2]["relationship"]))
NetworkX: Measures
g.number_of_nodes()
g.nodes(data=True)
g.number_of_edges()
g.edges(data=True)
nx.info(g)
nx.density(g)
nx.number_connected_components(g)
nx.degree_histogram(g)
nx.betweenness_centrality(g)
nx.clustering(g)
nx.clustering(g, nodes=["Bob"])
NetworkX: Visualize or save
#Save g to the file my_graph.graphml in graphml format
#prettyprint will make it nice for a human to read
nx.write_graphml(g,"my_graph.graphml",prettyprint=True)
#Layout g with the Fruchterman-Reingold force-directed
#algorithm and save the result to my_graph.png
#with_labels will label each node with its id
import matplotlib.pyplot as plt
nx.draw_spring(g,with_labels=True)
plt.savefig("my_graph.png")
plt.clf() #Clear plot
NetworkX: Odds and ends
#Read a graph from the file my_graph.graphml in graphml format
g=nx.read_graphml("my_graph.graphml")
#Create a (empty) directed graph
g=nx.DiGraph()
See http://networkx.github.io/documentation/latest/reference/
index.html for many more commands. Note that some commands are only
available on directed or undirected graphs.
Resources
Newman, M.E.J., Networks: An Introduction
Kadushin, C., Understanding Social Networks: Theories, Concepts, and
Findings
De Nooy, W., et al., Exploratory Social Network Analysis with Pajek
Shneiderman B., and Smith, M., Analyzing Social Media Networks with
NodeXL
(Social) Network Analysis
Scott A. Hale
Oxford Internet Institute
http://www.scotthale.net/
17 July 2014

More Related Content

What's hot

Community Detection in Social Media
Community Detection in Social MediaCommunity Detection in Social Media
Community Detection in Social Media
rezahk
 
02 Descriptive Statistics (2017)
02 Descriptive Statistics (2017)02 Descriptive Statistics (2017)
02 Descriptive Statistics (2017)
Duke Network Analysis Center
 
Social Network Analysis and Visualization
Social Network Analysis and VisualizationSocial Network Analysis and Visualization
Social Network Analysis and Visualization
Alberto Ramirez
 
Social Network Visualization 101
Social Network Visualization 101Social Network Visualization 101
Social Network Visualization 101
librarianrafia
 
11 Keynote (2017)
11 Keynote (2017)11 Keynote (2017)
11 Keynote (2017)
Duke Network Analysis Center
 
Social Network Analysis
Social Network AnalysisSocial Network Analysis
Social Network Analysis
Sujoy Bag
 
Social Network Analysis (SNA)
Social Network Analysis (SNA)Social Network Analysis (SNA)
Social Network Analysis (SNA)
Development Innovations
 
Social network analysis course 2010 - 2011
Social network analysis course 2010 - 2011Social network analysis course 2010 - 2011
Social network analysis course 2010 - 2011
guillaume ereteo
 
Community Detection in Social Networks: A Brief Overview
Community Detection in Social Networks: A Brief OverviewCommunity Detection in Social Networks: A Brief Overview
Community Detection in Social Networks: A Brief Overview
Satyaki Sikdar
 
Social Network Analysis (SNA) 2018
Social Network Analysis  (SNA) 2018Social Network Analysis  (SNA) 2018
Social Network Analysis (SNA) 2018
Arsalan Khan
 
Group and Community Detection in Social Networks
Group and Community Detection in Social NetworksGroup and Community Detection in Social Networks
Group and Community Detection in Social Networks
Kent State University
 
Dissemination of Awareness Evolution “What is really going on?” Pilkada 2015 ...
Dissemination of Awareness Evolution “What is really going on?” Pilkada 2015 ...Dissemination of Awareness Evolution “What is really going on?” Pilkada 2015 ...
Dissemination of Awareness Evolution “What is really going on?” Pilkada 2015 ...
Andry Alamsyah
 
The Basics of Social Network Analysis
The Basics of Social Network AnalysisThe Basics of Social Network Analysis
The Basics of Social Network Analysis
Rory Sie
 
Exploratory social network analysis with pajek
Exploratory social network analysis with pajekExploratory social network analysis with pajek
Exploratory social network analysis with pajek
THomas Plotkowiak
 
Social network analysis
Social network analysisSocial network analysis
Social network analysis
World Agroforestry (ICRAF)
 
05 Network Canvas (2017)
05 Network Canvas (2017)05 Network Canvas (2017)
05 Network Canvas (2017)
Duke Network Analysis Center
 
Social network analysis
Social network analysisSocial network analysis
Social network analysis
HashannaLockhart
 
01 Network Data Collection (2017)
01 Network Data Collection (2017)01 Network Data Collection (2017)
01 Network Data Collection (2017)
Duke Network Analysis Center
 
Social network analysis & Big Data - Telecommunications and more
Social network analysis & Big Data - Telecommunications and moreSocial network analysis & Big Data - Telecommunications and more
Social network analysis & Big Data - Telecommunications and moreWael Elrifai
 
The Mathematics of Social Network Analysis: Metrics for Academic Social Networks
The Mathematics of Social Network Analysis: Metrics for Academic Social NetworksThe Mathematics of Social Network Analysis: Metrics for Academic Social Networks
The Mathematics of Social Network Analysis: Metrics for Academic Social Networks
Editor IJCATR
 

What's hot (20)

Community Detection in Social Media
Community Detection in Social MediaCommunity Detection in Social Media
Community Detection in Social Media
 
02 Descriptive Statistics (2017)
02 Descriptive Statistics (2017)02 Descriptive Statistics (2017)
02 Descriptive Statistics (2017)
 
Social Network Analysis and Visualization
Social Network Analysis and VisualizationSocial Network Analysis and Visualization
Social Network Analysis and Visualization
 
Social Network Visualization 101
Social Network Visualization 101Social Network Visualization 101
Social Network Visualization 101
 
11 Keynote (2017)
11 Keynote (2017)11 Keynote (2017)
11 Keynote (2017)
 
Social Network Analysis
Social Network AnalysisSocial Network Analysis
Social Network Analysis
 
Social Network Analysis (SNA)
Social Network Analysis (SNA)Social Network Analysis (SNA)
Social Network Analysis (SNA)
 
Social network analysis course 2010 - 2011
Social network analysis course 2010 - 2011Social network analysis course 2010 - 2011
Social network analysis course 2010 - 2011
 
Community Detection in Social Networks: A Brief Overview
Community Detection in Social Networks: A Brief OverviewCommunity Detection in Social Networks: A Brief Overview
Community Detection in Social Networks: A Brief Overview
 
Social Network Analysis (SNA) 2018
Social Network Analysis  (SNA) 2018Social Network Analysis  (SNA) 2018
Social Network Analysis (SNA) 2018
 
Group and Community Detection in Social Networks
Group and Community Detection in Social NetworksGroup and Community Detection in Social Networks
Group and Community Detection in Social Networks
 
Dissemination of Awareness Evolution “What is really going on?” Pilkada 2015 ...
Dissemination of Awareness Evolution “What is really going on?” Pilkada 2015 ...Dissemination of Awareness Evolution “What is really going on?” Pilkada 2015 ...
Dissemination of Awareness Evolution “What is really going on?” Pilkada 2015 ...
 
The Basics of Social Network Analysis
The Basics of Social Network AnalysisThe Basics of Social Network Analysis
The Basics of Social Network Analysis
 
Exploratory social network analysis with pajek
Exploratory social network analysis with pajekExploratory social network analysis with pajek
Exploratory social network analysis with pajek
 
Social network analysis
Social network analysisSocial network analysis
Social network analysis
 
05 Network Canvas (2017)
05 Network Canvas (2017)05 Network Canvas (2017)
05 Network Canvas (2017)
 
Social network analysis
Social network analysisSocial network analysis
Social network analysis
 
01 Network Data Collection (2017)
01 Network Data Collection (2017)01 Network Data Collection (2017)
01 Network Data Collection (2017)
 
Social network analysis & Big Data - Telecommunications and more
Social network analysis & Big Data - Telecommunications and moreSocial network analysis & Big Data - Telecommunications and more
Social network analysis & Big Data - Telecommunications and more
 
The Mathematics of Social Network Analysis: Metrics for Academic Social Networks
The Mathematics of Social Network Analysis: Metrics for Academic Social NetworksThe Mathematics of Social Network Analysis: Metrics for Academic Social Networks
The Mathematics of Social Network Analysis: Metrics for Academic Social Networks
 

Viewers also liked

Mining the social web ch1
Mining the social web ch1Mining the social web ch1
Mining the social web ch1
HyeonSeok Choi
 
Challenges of dealing with uncertainty
Challenges of dealing with uncertaintyChallenges of dealing with uncertainty
Challenges of dealing with uncertainty
Bob Prieto
 
Network x python_meetup_2015-08-27
Network x python_meetup_2015-08-27Network x python_meetup_2015-08-27
Network x python_meetup_2015-08-27
Chris Allison
 
Network theory - PyCon 2015
Network theory - PyCon 2015Network theory - PyCon 2015
Network theory - PyCon 2015
Sarah Guido
 
Complex and Social Network Analysis in Python
Complex and Social Network Analysis in PythonComplex and Social Network Analysis in Python
Complex and Social Network Analysis in Python
rik0
 
Graph Analyses with Python and NetworkX
Graph Analyses with Python and NetworkXGraph Analyses with Python and NetworkX
Graph Analyses with Python and NetworkX
Benjamin Bengfort
 
Abschied vom Gewinnspiel-Tab: Integriertes Facebook Marketing mit Open Graph-...
Abschied vom Gewinnspiel-Tab: Integriertes Facebook Marketing mit Open Graph-...Abschied vom Gewinnspiel-Tab: Integriertes Facebook Marketing mit Open Graph-...
Abschied vom Gewinnspiel-Tab: Integriertes Facebook Marketing mit Open Graph-...
AllFacebook.de
 
Simplifying Social Network Diagrams
Simplifying Social Network Diagrams Simplifying Social Network Diagrams
Simplifying Social Network Diagrams
Lynn Cherny
 
Overview of Modern Graph Analysis Tools
Overview of Modern Graph Analysis ToolsOverview of Modern Graph Analysis Tools
Overview of Modern Graph Analysis Tools
Keiichiro Ono
 
Analytics meets Big Data – R/Python auf der Hadoop/Spark-Plattform
Analytics meets Big Data – R/Python auf der Hadoop/Spark-PlattformAnalytics meets Big Data – R/Python auf der Hadoop/Spark-Plattform
Analytics meets Big Data – R/Python auf der Hadoop/Spark-Plattform
Rising Media Ltd.
 
3 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 20173 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 2017
Drift
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
Leslie Samuel
 

Viewers also liked (13)

Mining the social web ch1
Mining the social web ch1Mining the social web ch1
Mining the social web ch1
 
Challenges of dealing with uncertainty
Challenges of dealing with uncertaintyChallenges of dealing with uncertainty
Challenges of dealing with uncertainty
 
Network x python_meetup_2015-08-27
Network x python_meetup_2015-08-27Network x python_meetup_2015-08-27
Network x python_meetup_2015-08-27
 
Network theory - PyCon 2015
Network theory - PyCon 2015Network theory - PyCon 2015
Network theory - PyCon 2015
 
Python & PyDev
Python & PyDevPython & PyDev
Python & PyDev
 
Complex and Social Network Analysis in Python
Complex and Social Network Analysis in PythonComplex and Social Network Analysis in Python
Complex and Social Network Analysis in Python
 
Graph Analyses with Python and NetworkX
Graph Analyses with Python and NetworkXGraph Analyses with Python and NetworkX
Graph Analyses with Python and NetworkX
 
Abschied vom Gewinnspiel-Tab: Integriertes Facebook Marketing mit Open Graph-...
Abschied vom Gewinnspiel-Tab: Integriertes Facebook Marketing mit Open Graph-...Abschied vom Gewinnspiel-Tab: Integriertes Facebook Marketing mit Open Graph-...
Abschied vom Gewinnspiel-Tab: Integriertes Facebook Marketing mit Open Graph-...
 
Simplifying Social Network Diagrams
Simplifying Social Network Diagrams Simplifying Social Network Diagrams
Simplifying Social Network Diagrams
 
Overview of Modern Graph Analysis Tools
Overview of Modern Graph Analysis ToolsOverview of Modern Graph Analysis Tools
Overview of Modern Graph Analysis Tools
 
Analytics meets Big Data – R/Python auf der Hadoop/Spark-Plattform
Analytics meets Big Data – R/Python auf der Hadoop/Spark-PlattformAnalytics meets Big Data – R/Python auf der Hadoop/Spark-Plattform
Analytics meets Big Data – R/Python auf der Hadoop/Spark-Plattform
 
3 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 20173 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 2017
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
 

Similar to Oxford Digital Humanities Summer School

Socialnetworkanalysis (Tin180 Com)
Socialnetworkanalysis (Tin180 Com)Socialnetworkanalysis (Tin180 Com)
Socialnetworkanalysis (Tin180 Com)
Tin180 VietNam
 
Social Network Based Information Systems (Tin180 Com)
Social Network Based Information Systems (Tin180 Com)Social Network Based Information Systems (Tin180 Com)
Social Network Based Information Systems (Tin180 Com)
Tin180 VietNam
 
Topology ppt
Topology pptTopology ppt
Topology ppt
karan saini
 
Topology ppt
Topology pptTopology ppt
Topology pptboocse11
 
Interpretation of the biological knowledge using networks approach
Interpretation of the biological knowledge using networks approachInterpretation of the biological knowledge using networks approach
Interpretation of the biological knowledge using networks approach
Elena Sügis
 
TopologyPPT.ppt
TopologyPPT.pptTopologyPPT.ppt
TopologyPPT.ppt
ssuser933685
 
Static networks
Static networksStatic networks
Static networks
mohamed_awad121
 
4. social network analysis
4. social network analysis4. social network analysis
4. social network analysis
Lokesh Ramaswamy
 
Topology of the Network class 8 .ppt pdf
Topology of the Network class 8 .ppt pdfTopology of the Network class 8 .ppt pdf
Topology of the Network class 8 .ppt pdf
AnushkaTripathi61
 
Academic Course: 02 Self-organization and emergence in networked systems
Academic Course: 02 Self-organization and emergence in networked systemsAcademic Course: 02 Self-organization and emergence in networked systems
Academic Course: 02 Self-organization and emergence in networked systems
FET AWARE project - Self Awareness in Autonomic Systems
 
Network Measures Social Computing-Unit 2.pptx
Network Measures Social Computing-Unit 2.pptxNetwork Measures Social Computing-Unit 2.pptx
Network Measures Social Computing-Unit 2.pptx
chavanprasad17092001
 
TreeNetViz - Revealing Patterns of Networks over Tree Structure.
TreeNetViz - Revealing Patterns of Networks over Tree Structure.TreeNetViz - Revealing Patterns of Networks over Tree Structure.
TreeNetViz - Revealing Patterns of Networks over Tree Structure.
liangou
 
Higher-order clustering coefficients at Purdue CSoI
Higher-order clustering coefficients at Purdue CSoIHigher-order clustering coefficients at Purdue CSoI
Higher-order clustering coefficients at Purdue CSoI
Austin Benson
 
Network topology And Its Types
Network topology And Its Types Network topology And Its Types
Network topology And Its Types
Jaypee Institute of Information Technology
 
Lecture 5 - Qunatifying a Network.pdf
Lecture 5 - Qunatifying a Network.pdfLecture 5 - Qunatifying a Network.pdf
Lecture 5 - Qunatifying a Network.pdf
clararoumany1
 
Community detection in social networks[1]
Community detection in social networks[1]Community detection in social networks[1]
Community detection in social networks[1]
sdnumaygmailcom
 
2016 Cytoscape 3.3 Tutorial
2016 Cytoscape 3.3 Tutorial2016 Cytoscape 3.3 Tutorial
2016 Cytoscape 3.3 Tutorial
Alexander Pico
 
Community Detection in Networks Using Page Rank Vectors
Community Detection in Networks Using Page Rank Vectors Community Detection in Networks Using Page Rank Vectors
Community Detection in Networks Using Page Rank Vectors
ijbbjournal
 
Community Detection in Networks Using Page Rank Vectors
Community Detection in Networks Using Page Rank Vectors Community Detection in Networks Using Page Rank Vectors
Community Detection in Networks Using Page Rank Vectors
ijbbjournal
 

Similar to Oxford Digital Humanities Summer School (20)

Socialnetworkanalysis (Tin180 Com)
Socialnetworkanalysis (Tin180 Com)Socialnetworkanalysis (Tin180 Com)
Socialnetworkanalysis (Tin180 Com)
 
Social Network Based Information Systems (Tin180 Com)
Social Network Based Information Systems (Tin180 Com)Social Network Based Information Systems (Tin180 Com)
Social Network Based Information Systems (Tin180 Com)
 
Topology ppt
Topology pptTopology ppt
Topology ppt
 
Topology ppt
Topology pptTopology ppt
Topology ppt
 
Topology ppt
Topology pptTopology ppt
Topology ppt
 
Interpretation of the biological knowledge using networks approach
Interpretation of the biological knowledge using networks approachInterpretation of the biological knowledge using networks approach
Interpretation of the biological knowledge using networks approach
 
TopologyPPT.ppt
TopologyPPT.pptTopologyPPT.ppt
TopologyPPT.ppt
 
Static networks
Static networksStatic networks
Static networks
 
4. social network analysis
4. social network analysis4. social network analysis
4. social network analysis
 
Topology of the Network class 8 .ppt pdf
Topology of the Network class 8 .ppt pdfTopology of the Network class 8 .ppt pdf
Topology of the Network class 8 .ppt pdf
 
Academic Course: 02 Self-organization and emergence in networked systems
Academic Course: 02 Self-organization and emergence in networked systemsAcademic Course: 02 Self-organization and emergence in networked systems
Academic Course: 02 Self-organization and emergence in networked systems
 
Network Measures Social Computing-Unit 2.pptx
Network Measures Social Computing-Unit 2.pptxNetwork Measures Social Computing-Unit 2.pptx
Network Measures Social Computing-Unit 2.pptx
 
TreeNetViz - Revealing Patterns of Networks over Tree Structure.
TreeNetViz - Revealing Patterns of Networks over Tree Structure.TreeNetViz - Revealing Patterns of Networks over Tree Structure.
TreeNetViz - Revealing Patterns of Networks over Tree Structure.
 
Higher-order clustering coefficients at Purdue CSoI
Higher-order clustering coefficients at Purdue CSoIHigher-order clustering coefficients at Purdue CSoI
Higher-order clustering coefficients at Purdue CSoI
 
Network topology And Its Types
Network topology And Its Types Network topology And Its Types
Network topology And Its Types
 
Lecture 5 - Qunatifying a Network.pdf
Lecture 5 - Qunatifying a Network.pdfLecture 5 - Qunatifying a Network.pdf
Lecture 5 - Qunatifying a Network.pdf
 
Community detection in social networks[1]
Community detection in social networks[1]Community detection in social networks[1]
Community detection in social networks[1]
 
2016 Cytoscape 3.3 Tutorial
2016 Cytoscape 3.3 Tutorial2016 Cytoscape 3.3 Tutorial
2016 Cytoscape 3.3 Tutorial
 
Community Detection in Networks Using Page Rank Vectors
Community Detection in Networks Using Page Rank Vectors Community Detection in Networks Using Page Rank Vectors
Community Detection in Networks Using Page Rank Vectors
 
Community Detection in Networks Using Page Rank Vectors
Community Detection in Networks Using Page Rank Vectors Community Detection in Networks Using Page Rank Vectors
Community Detection in Networks Using Page Rank Vectors
 

More from Scott A. Hale

Researching Misinformation
Researching MisinformationResearching Misinformation
Researching Misinformation
Scott A. Hale
 
Big Tech & Disinformation: What are the main threats and how can journalists ...
Big Tech & Disinformation: What are the main threats and how can journalists ...Big Tech & Disinformation: What are the main threats and how can journalists ...
Big Tech & Disinformation: What are the main threats and how can journalists ...
Scott A. Hale
 
No Master Algorithm: Human-machine intelligence and the real-world needs of f...
No Master Algorithm: Human-machine intelligence and the real-world needs of f...No Master Algorithm: Human-machine intelligence and the real-world needs of f...
No Master Algorithm: Human-machine intelligence and the real-world needs of f...
Scott A. Hale
 
Foreign-language Reviews: Help or Hindrance? (Slides)
Foreign-language Reviews: Help or Hindrance? (Slides)Foreign-language Reviews: Help or Hindrance? (Slides)
Foreign-language Reviews: Help or Hindrance? (Slides)
Scott A. Hale
 
How much is said in a microblog? A multilingual inquiry based on Weibo and Tw...
How much is said in a microblog? A multilingual inquiry based on Weibo and Tw...How much is said in a microblog? A multilingual inquiry based on Weibo and Tw...
How much is said in a microblog? A multilingual inquiry based on Weibo and Tw...
Scott A. Hale
 
Interactive Visualizations for teaching, research, and dissemination
Interactive Visualizations for teaching, research, and disseminationInteractive Visualizations for teaching, research, and dissemination
Interactive Visualizations for teaching, research, and dissemination
Scott A. Hale
 
Multilinguals and Wikipedia Editing
Multilinguals and Wikipedia EditingMultilinguals and Wikipedia Editing
Multilinguals and Wikipedia Editing
Scott A. Hale
 
Mapping the UK Webspace: Fifteen Years of British Universities on the Web
Mapping the UK Webspace: Fifteen Years of British Universities on the WebMapping the UK Webspace: Fifteen Years of British Universities on the Web
Mapping the UK Webspace: Fifteen Years of British Universities on the Web
Scott A. Hale
 
Design and Multilingual Users on Twitter and Wikipedia
Design and Multilingual Users on Twitter and WikipediaDesign and Multilingual Users on Twitter and Wikipedia
Design and Multilingual Users on Twitter and Wikipedia
Scott A. Hale
 
Ancient History of the UK Web
Ancient History of the UK WebAncient History of the UK Web
Ancient History of the UK Web
Scott A. Hale
 
Global connectivity and multilinguals in the Twitter network (slides)
Global connectivity and multilinguals in the Twitter network (slides)Global connectivity and multilinguals in the Twitter network (slides)
Global connectivity and multilinguals in the Twitter network (slides)
Scott A. Hale
 
ECPR 2011 Leaders and Followers Experiment
ECPR 2011 Leaders and Followers ExperimentECPR 2011 Leaders and Followers Experiment
ECPR 2011 Leaders and Followers Experiment
Scott A. Hale
 

More from Scott A. Hale (12)

Researching Misinformation
Researching MisinformationResearching Misinformation
Researching Misinformation
 
Big Tech & Disinformation: What are the main threats and how can journalists ...
Big Tech & Disinformation: What are the main threats and how can journalists ...Big Tech & Disinformation: What are the main threats and how can journalists ...
Big Tech & Disinformation: What are the main threats and how can journalists ...
 
No Master Algorithm: Human-machine intelligence and the real-world needs of f...
No Master Algorithm: Human-machine intelligence and the real-world needs of f...No Master Algorithm: Human-machine intelligence and the real-world needs of f...
No Master Algorithm: Human-machine intelligence and the real-world needs of f...
 
Foreign-language Reviews: Help or Hindrance? (Slides)
Foreign-language Reviews: Help or Hindrance? (Slides)Foreign-language Reviews: Help or Hindrance? (Slides)
Foreign-language Reviews: Help or Hindrance? (Slides)
 
How much is said in a microblog? A multilingual inquiry based on Weibo and Tw...
How much is said in a microblog? A multilingual inquiry based on Weibo and Tw...How much is said in a microblog? A multilingual inquiry based on Weibo and Tw...
How much is said in a microblog? A multilingual inquiry based on Weibo and Tw...
 
Interactive Visualizations for teaching, research, and dissemination
Interactive Visualizations for teaching, research, and disseminationInteractive Visualizations for teaching, research, and dissemination
Interactive Visualizations for teaching, research, and dissemination
 
Multilinguals and Wikipedia Editing
Multilinguals and Wikipedia EditingMultilinguals and Wikipedia Editing
Multilinguals and Wikipedia Editing
 
Mapping the UK Webspace: Fifteen Years of British Universities on the Web
Mapping the UK Webspace: Fifteen Years of British Universities on the WebMapping the UK Webspace: Fifteen Years of British Universities on the Web
Mapping the UK Webspace: Fifteen Years of British Universities on the Web
 
Design and Multilingual Users on Twitter and Wikipedia
Design and Multilingual Users on Twitter and WikipediaDesign and Multilingual Users on Twitter and Wikipedia
Design and Multilingual Users on Twitter and Wikipedia
 
Ancient History of the UK Web
Ancient History of the UK WebAncient History of the UK Web
Ancient History of the UK Web
 
Global connectivity and multilinguals in the Twitter network (slides)
Global connectivity and multilinguals in the Twitter network (slides)Global connectivity and multilinguals in the Twitter network (slides)
Global connectivity and multilinguals in the Twitter network (slides)
 
ECPR 2011 Leaders and Followers Experiment
ECPR 2011 Leaders and Followers ExperimentECPR 2011 Leaders and Followers Experiment
ECPR 2011 Leaders and Followers Experiment
 

Recently uploaded

Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 

Recently uploaded (20)

Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 

Oxford Digital Humanities Summer School

  • 1. (Social) Network Analysis Scott A. Hale Oxford Internet Institute http://www.scotthale.net/ 17 July 2014
  • 2. What are networks? Networks (graphs) are set of nodes (verticies) connected by edges (links, ties, arcs)
  • 3. What are networks? Networks (graphs) are set of nodes (verticies) connected by edges (links, ties, arcs) Additional details Whole vs. ego: whole networks have all nodes within a natural boundary (platform, organization, etc.). An ego network has one node and all of its immediate neighbors. Edges can be directed or undirected and weighted or unweighted Additionally, networks may be multilayer and/or multimodal.
  • 4. Why? Characterize network structure How far apart / well-connected are nodes? Are some nodes at more important positions? Is the network composed of communities? How does network structure affect processes? Information diffusion Coordination/cooperation Resilience to failure/attack
  • 5. A network First questions when approaching a network What are edges? What are nodes? What kind of network? Inclusion/exclusion criteria
  • 7. Python resources tweepy: Package for Twitter stream and search APIs (only python 2.7 at the moment) search and stream API example code along with code to create mentions/retweet network at https://github.com/computermacgyver/twitter-python Python two versions: 2.7.x – many packages, issues with non-English scripts 3.x – less packages, but excellent handling of international scripts (unicode)
  • 8. NetworkX http://networkx.github.io/ Package to represent networks as python objects Convenient functions to add, delete, iterate nodes/edges Functions to calculate network statistics (degree, clustering, etc.) Easily generate comparison graphs based on statistical models Visualization Alternatives include igraph (available for Python and R)
  • 9. Gephi Open-source, cross-platform GUI interface Primary strength is to visualize networks Basic statistical properties are also available Alternatives include NodeXL, Pajek, GUESS, NetDraw, Tulip, and more
  • 10. Network measures With many nodes visualizations are often difficult/impossible to interpret. Statistical measures can be very revealing, however. Node-level Degree (in, out): How many incoming/outgoing edges does a node have? Centrality (next slide) Constraint Network-level Components: Number of disconnected subsets of nodes Density: observed edges maximum number of edges possible Clustering coefficient closed triplets connected triples Path length distribution Distributions of node-level measures
  • 11. Centrality measures Degree Closeness: Measures the average geodesic distance to ALL other nodes. Informally, an indication of the ability of a node to diffuse a property efficiently. Betweenness: Number of shortest paths the node lies on. Informally, the betweenness is high if a node bridges clusters. Eigenvector: A weighted degree centrality (inbound links from highly central nodes count more). PageRank: Not strictly a centrality measure, but similar to eigenvector but modeled as a random walk with a teleportation parameter
  • 12. NetworkX: Nodes import networkx as nx g=nx.Graph() #A new (empty) undirected graph g.add_node("Alan") #Add one new node g.add_nodes_from(["Bob","Carol","Denise"])#Add three new nodes #Nodes can have attributes g.node["Alan"]["gender"]="M" g.node["Bob"]["gender"]="M" g.node["Carol"]["gender"]="F" g.node["Denise"]["gender"]="F" for n in g: print("{0} has gender {1}".format(n,g.node[n]["gender"]))
  • 13. NetworkX: Edges #Interesting graphs have edges g.add_edge("Alan","Bob") #Add one new edge #Add two new edges g.add_edges_from([["Carol","Denise"],["Carol","Bob"]]) #Edge attributes g.edge["Alan"]["Bob"]["relationship"]="Friends" g.edge["Carol"]["Denise"]["relationship"]="Friends" g.edge["Carol"]["Bob"]["relationship"]="Married" #New edge with an attribute g.add_edges_from([["Carol","Alan", {"relationship":"Friends"}]])
  • 14. NetworkX: Edges for e in g.edges_iter(): n1=e[0] n2=e[1] print("{0} and {1} are {2}".format(n1,n2, g.edge[n1][n2]["relationship"]))
  • 16. NetworkX: Visualize or save #Save g to the file my_graph.graphml in graphml format #prettyprint will make it nice for a human to read nx.write_graphml(g,"my_graph.graphml",prettyprint=True) #Layout g with the Fruchterman-Reingold force-directed #algorithm and save the result to my_graph.png #with_labels will label each node with its id import matplotlib.pyplot as plt nx.draw_spring(g,with_labels=True) plt.savefig("my_graph.png") plt.clf() #Clear plot
  • 17. NetworkX: Odds and ends #Read a graph from the file my_graph.graphml in graphml format g=nx.read_graphml("my_graph.graphml") #Create a (empty) directed graph g=nx.DiGraph() See http://networkx.github.io/documentation/latest/reference/ index.html for many more commands. Note that some commands are only available on directed or undirected graphs.
  • 18. Resources Newman, M.E.J., Networks: An Introduction Kadushin, C., Understanding Social Networks: Theories, Concepts, and Findings De Nooy, W., et al., Exploratory Social Network Analysis with Pajek Shneiderman B., and Smith, M., Analyzing Social Media Networks with NodeXL
  • 19. (Social) Network Analysis Scott A. Hale Oxford Internet Institute http://www.scotthale.net/ 17 July 2014