SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Downloaden Sie, um offline zu lesen
(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

Weitere ähnliche Inhalte

Was ist angesagt?

Community Detection in Social Media
Community Detection in Social MediaCommunity Detection in Social Media
Community Detection in Social Mediarezahk
 
Social Network Analysis and Visualization
Social Network Analysis and VisualizationSocial Network Analysis and Visualization
Social Network Analysis and VisualizationAlberto Ramirez
 
Social Network Visualization 101
Social Network Visualization 101Social Network Visualization 101
Social Network Visualization 101librarianrafia
 
Social Network Analysis
Social Network AnalysisSocial Network Analysis
Social Network AnalysisSujoy Bag
 
Social network analysis course 2010 - 2011
Social network analysis course 2010 - 2011Social network analysis course 2010 - 2011
Social network analysis course 2010 - 2011guillaume 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 OverviewSatyaki Sikdar
 
Social Network Analysis (SNA) 2018
Social Network Analysis  (SNA) 2018Social Network Analysis  (SNA) 2018
Social Network Analysis (SNA) 2018Arsalan 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 NetworksKent 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 AnalysisRory Sie
 
Exploratory social network analysis with pajek
Exploratory social network analysis with pajekExploratory social network analysis with pajek
Exploratory social network analysis with pajekTHomas Plotkowiak
 
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 NetworksEditor IJCATR
 

Was ist angesagt? (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
 

Andere mochten auch

Mining the social web ch1
Mining the social web ch1Mining the social web ch1
Mining the social web ch1HyeonSeok Choi
 
Challenges of dealing with uncertainty
Challenges of dealing with uncertaintyChallenges of dealing with uncertainty
Challenges of dealing with uncertaintyBob 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-27Chris Allison
 
Network theory - PyCon 2015
Network theory - PyCon 2015Network theory - PyCon 2015
Network theory - PyCon 2015Sarah 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 Pythonrik0
 
Graph Analyses with Python and NetworkX
Graph Analyses with Python and NetworkXGraph Analyses with Python and NetworkX
Graph Analyses with Python and NetworkXBenjamin 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 ToolsKeiichiro 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-PlattformRising 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 2017Drift
 
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 NicheLeslie Samuel
 

Andere mochten auch (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
 

Ähnlich wie 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 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 approachElena Sügis
 
4. social network analysis
4. social network analysis4. social network analysis
4. social network analysisLokesh Ramaswamy
 
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.pptxchavanprasad17092001
 
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 CSoIAustin Benson
 
Lecture 5 - Qunatifying a Network.pdf
Lecture 5 - Qunatifying a Network.pdfLecture 5 - Qunatifying a Network.pdf
Lecture 5 - Qunatifying a Network.pdfclararoumany1
 
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 TutorialAlexander 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
 
An Introduction to Graph Databases
An Introduction to Graph DatabasesAn Introduction to Graph Databases
An Introduction to Graph DatabasesInfiniteGraph
 

Ähnlich wie 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
 
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
 
An Introduction to Graph Databases
An Introduction to Graph DatabasesAn Introduction to Graph Databases
An Introduction to Graph Databases
 

Mehr von Scott A. Hale

Researching Misinformation
Researching MisinformationResearching Misinformation
Researching MisinformationScott 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 disseminationScott A. Hale
 
Multilinguals and Wikipedia Editing
Multilinguals and Wikipedia EditingMultilinguals and Wikipedia Editing
Multilinguals and Wikipedia EditingScott 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 WebScott 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 WikipediaScott A. Hale
 
Ancient History of the UK Web
Ancient History of the UK WebAncient History of the UK Web
Ancient History of the UK WebScott 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 ExperimentScott A. Hale
 

Mehr von 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
 

Kürzlich hochgeladen

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 

Kürzlich hochgeladen (20)

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 

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