36
K atherine Ognyanova (Katya) Postdoctoral Research Fellow, The Lazer Lab Email: [email protected] Website: www.kateto.net Twitter: @ ognyanova R Network Visualization Workshop POLNET 2015, Portland OR

Static and dynamic network visualization with R: PolNet Workshop 2015

Embed Size (px)

Citation preview

Page 1: Static and dynamic network visualization with R: PolNet Workshop 2015

Katherine Ognyanova (Katya) • Postdoctoral Research Fellow, The Lazer LabEmail: [email protected] • Website: www.kateto.net • Twitter: @ognyanova

R Network Visualization WorkshopPOLNET 2015, Portland OR

Page 2: Static and dynamic network visualization with R: PolNet Workshop 2015

Slide 2 www.kateto.net

Workshop data files, handout & R code: kateto.net/polnet2015

Page 3: Static and dynamic network visualization with R: PolNet Workshop 2015

Slide 3 www.kateto.net

Selecting the right network visualization

Page 4: Static and dynamic network visualization with R: PolNet Workshop 2015

Slide 4 www.kateto.net

1. Purpose

Page 5: Static and dynamic network visualization with R: PolNet Workshop 2015

Slide 5 www.kateto.net

2. Audience

Page 6: Static and dynamic network visualization with R: PolNet Workshop 2015

Visualization goals

The network as a map

Key actors and links

Relationship strength

Diffusion patterns

Structural properties

Communities

A B

Page 7: Static and dynamic network visualization with R: PolNet Workshop 2015

Some network visualization types

Hive plots

Network Maps

Arc diagrams

Biofabric

Statistical charts

Heat maps

Page 8: Static and dynamic network visualization with R: PolNet Workshop 2015

Arc Diagram (R package arcdiagram)

Les Miserables Arc Diagram, Gaston Sanchez 2013

Page 9: Static and dynamic network visualization with R: PolNet Workshop 2015

Heatmap (base R, ggplot2)

Liu, Wang, Wang & Xie, PLOS ONE 2014

Page 10: Static and dynamic network visualization with R: PolNet Workshop 2015

Hive plot (R package HiveR)

www.hiveplot.net, 2014

Page 11: Static and dynamic network visualization with R: PolNet Workshop 2015

Slide 11 www.kateto.net

Network visualization controls

Page 12: Static and dynamic network visualization with R: PolNet Workshop 2015

Network visualization controls

Color

Size

Position

Shape

Honorable mention: arrows (direction) and labels (identification)

Page 13: Static and dynamic network visualization with R: PolNet Workshop 2015

Layout aesthetics

Minimize edge crossingNo Yes

Prevent overlapNo Yes

Uniform edge lengthNo Yes

SymmetryNo Yes

Page 14: Static and dynamic network visualization with R: PolNet Workshop 2015

Slide 14 www.kateto.net

Some network examples

Page 15: Static and dynamic network visualization with R: PolNet Workshop 2015

Adoption of topics in the US media system. Source: www.kateto.net

Classic „pretty spaghetti bowl“ network viz

Page 16: Static and dynamic network visualization with R: PolNet Workshop 2015

Stability in Afghanistan US military chart, via NYT.com, 2010

Page 17: Static and dynamic network visualization with R: PolNet Workshop 2015

Internet Backbone: Each node represents an IP address. Source: Wikipedia

Page 18: Static and dynamic network visualization with R: PolNet Workshop 2015

Linking patterns in the US political blogosphere. Source: Adamic & Glance (2005)

Page 19: Static and dynamic network visualization with R: PolNet Workshop 2015

Twitter network, @OIIOxford. Source: Hogan, 2011

Page 20: Static and dynamic network visualization with R: PolNet Workshop 2015

Wikipedia co-editing patterns among top editors in English. Source: Hogan, 2012

Page 21: Static and dynamic network visualization with R: PolNet Workshop 2015

Map of the Web: Nodes represent websites. Source: internet-map.net

Page 22: Static and dynamic network visualization with R: PolNet Workshop 2015

Flavor network and the principles of food preparing. Source: Ahn, Ahnert, Bagrow & Barabasi , 2012

Page 23: Static and dynamic network visualization with R: PolNet Workshop 2015

Disease network: phenotype and disease gene associations. Source: Diseasome.eu, 2013

Page 24: Static and dynamic network visualization with R: PolNet Workshop 2015

Network of Facebook friendships. Source: Facebook.com , 2010

Page 25: Static and dynamic network visualization with R: PolNet Workshop 2015

Global Flights Network. Source: www.visualizing.org, 2012

Page 26: Static and dynamic network visualization with R: PolNet Workshop 2015

Global Spread of H1N1 and human mobility. Source: gleamviz.org, 2011

Page 27: Static and dynamic network visualization with R: PolNet Workshop 2015

Spatiotemporal Processes of Information Diffusion. Source: Cao, Lin, Sun, Lazer, Liu, Qu (2012)

Page 28: Static and dynamic network visualization with R: PolNet Workshop 2015

The world according to Democrats in Congress – Lazer, Tsur, Ognyanova 2015

Page 29: Static and dynamic network visualization with R: PolNet Workshop 2015

The world according to Republicans Congress – Lazer, Tsur, Ognyanova 2015

Page 30: Static and dynamic network visualization with R: PolNet Workshop 2015

Slide 30 www.kateto.net

Quick note on network formats

Page 31: Static and dynamic network visualization with R: PolNet Workshop 2015

A B C D E

A 0 0 0 0 0

B 1 0 0 0 1

C 1 0 0 1 1

D 0 0 0 0 0

E 0 0 0 0 0

A

CB D

E

Network formats: the Matrix

Page 32: Static and dynamic network visualization with R: PolNet Workshop 2015

B A 1

B E 1

C A 1

C E 1

C D 1

A

CB D

E

Source Destination Weight

Note: Weights are optional.

Network formats: the Edgelist

Page 33: Static and dynamic network visualization with R: PolNet Workshop 2015

B A E

C A D E

A

CB D

E

Source Destinations

Network formats: the Nodelist

Page 34: Static and dynamic network visualization with R: PolNet Workshop 2015

A yellow 1

B green 3

C orange 5

D yellow 3

E blue 1

A

CB D

E

Node ID Attr1 Attr2

Network formats: Node attributes

Page 35: Static and dynamic network visualization with R: PolNet Workshop 2015

Network types: adjacency and affiliation

Adjacency(one-mode graph)

Affiliation(two-mode / bipartite graph)

PaulKate

HP

Jill

MS

JohnJim

Paul

Kate

John Jill

Jim

Page 36: Static and dynamic network visualization with R: PolNet Workshop 2015

Contact Information:Katherine OgnyanovaE-mail: [email protected]: www.kateto.net