Download - Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Transcript
Page 1: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Graph all the ThingsA story of data and relationships

Andreas Kollegger Product Designer

@akollegger

Page 2: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014
Page 3: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014
Page 4: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014
Page 5: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014
Page 6: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014
Page 7: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014
Page 8: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

2005: Lusaka, Zambia

Page 9: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

2005: Lusaka, Zambia

Page 10: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

ALS Lou Gehrig's Disease

Amyotrophic lateral sclerosismotor neurone disease

Charcot disease

MND

ICD-10G12.2

ICD-9335.20

OMIM105400

2005: Lusaka, Zambia

Page 11: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

ALS Lou Gehrig's Disease

Amyotrophic lateral sclerosismotor neurone disease

Charcot disease

MND

ICD-10G12.2

ICD-9335.20

OMIM105400

2005: Lusaka, Zambia

ALS Lou Gehrig's Disease

Amyotrophic lateral sclerosismotor neurone disease

Charcot disease

MND

ICD-10G12.2

ICD-9335.20

OMIM105400

Page 12: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

ALS Lou Gehrig's Disease

Amyotrophic lateral sclerosismotor neurone disease

Charcot disease

MND

ICD-10G12.2

ICD-9335.20

OMIM105400

2005: Lusaka, Zambia

SNOMED?

ALS Lou Gehrig's Disease

Amyotrophic lateral sclerosismotor neurone disease

Charcot disease

MND

ICD-10G12.2

ICD-9335.20

OMIM105400

Page 13: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

ALS Lou Gehrig's Disease

Amyotrophic lateral sclerosismotor neurone disease

Charcot disease

MND

ICD-10G12.2

ICD-9335.20

OMIM105400

2005: Lusaka, Zambia

SNOMED? LOINC?

ALS Lou Gehrig's Disease

Amyotrophic lateral sclerosismotor neurone disease

Charcot disease

MND

ICD-10G12.2

ICD-9335.20

OMIM105400

Page 14: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

ALS Lou Gehrig's Disease

Amyotrophic lateral sclerosismotor neurone disease

Charcot disease

MND

ICD-10G12.2

ICD-9335.20

OMIM105400

2005: Lusaka, Zambia

SNOMED? LOINC? Non-English terms and local idioms?

ALS Lou Gehrig's Disease

Amyotrophic lateral sclerosismotor neurone disease

Charcot disease

MND

ICD-10G12.2

ICD-9335.20

OMIM105400

Page 15: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

ALS Lou Gehrig's Disease

Amyotrophic lateral sclerosismotor neurone disease

Charcot disease

MND

ICD-10G12.2

ICD-9335.20

OMIM105400

2005: Lusaka, Zambia

SNOMED? LOINC? Non-English terms and local idioms?

ALS Lou Gehrig's Disease

Amyotrophic lateral sclerosismotor neurone disease

Charcot disease

MND

ICD-10G12.2

ICD-9335.20

OMIM105400

Categories and Indicators and Related Conditions and Treatments and Drugs?

Page 16: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Hey, who wants to come to Sweden to hack on Neo4j for 6 months?

Page 17: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

2000: Sweden

Page 18: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

2000: Sweden

Page 19: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

2000: Sweden

Page 20: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

2000: Sweden

Page 21: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

2000: Sweden

Page 22: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Graphs are not a new idea, just the right idea right now.

Page 23: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

1736: Königsberg

Page 24: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

A

B

D

C

1736: Königsberg7 Bridges Problem

Page 25: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

A

B

D

C

1736: Königsberg7 Bridges Problem

Page 26: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

A

B

D

C

1736: Königsberg7 Bridges Problem

Page 27: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

A

B

D

C

1736: Königsberg7 Bridges Problem

Page 28: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

A

B

D

C

1

2 3

4

7

6

5

1736: Königsberg7 Bridges Problem

Page 29: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

A

B

D

C

1

2 3

4

7

6

5

1736: Königsberg7 Bridges Problem

Page 30: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Graphs are everywhere!

Page 31: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Neo Technology, Inc Confidential

Page 32: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014
Page 33: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014
Page 34: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014
Page 35: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

NOSQL == Not Only SQL

Page 36: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Hint: Relationships Matter

Put all of us into a database. !

Ask an RDBMS: “What's the average age of everyone here?”

!Ask Neo4j:

“Who should I get to know better?”

Page 37: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Member Group

Page 38: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Member Group

143 Andreas

Page 39: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Member Group

143 Andreas326 Stockholm

725 San Francisco

981 Boston

Page 40: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Member GroupMember_Group

143 Andreas326 Stockholm

725 San Francisco

981 Boston

Page 41: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Member GroupMember_Group

143 Andreas326 Stockholm

725 San Francisco

981 Boston143 981

143 725

143 326

Page 42: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Andreas

India

San Francisco

Boston

143 326

725

981

143 981

143 725

143 326

Page 43: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Andreas

India

San Francisco

Boston

Page 44: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Property Graph

Page 45: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Nodes

Property Graph

Page 46: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Nodes

Property Graph

Page 47: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Nodes

Member

Group

Group

Group

with Labels

Property Graph

Page 48: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Nodes

Member

Group

Group

Group

with LabelsRelationships

Property Graph

Page 49: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Nodes

uid: ABK name: Andreas

uid: STK where: Stockholm

uid: SFO where: San Francisco

uid: BOS where: Boston

Member

Group

Group

Group

with LabelsRelationships with Type

MEMBER_OF

MEMBER_OF

MEMBER_O

F

since: 2009

since: 2013

since: 2012

Property Graph

Page 50: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Nodes

uid: ABK name: Andreas

uid: STK where: Stockholm

uid: SFO where: San Francisco

uid: BOS where: Boston

Member

Group

Group

Group

with LabelsRelationships with Type

MEMBER_OF

MEMBER_OF

MEMBER_O

F

since: 2009

since: 2013

since: 2012

Properties on both

Property Graph

Page 51: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

What about the wolves?!? Tell me about the wolves!

Page 52: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

How Wolves Change Rivers: Research Results

Page 53: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

How Wolves Change Rivers: Known Influences Modeled as a Graph

Page 54: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

How Wolves Change Rivers: Known Influences Modeled as a Graph

Page 55: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

How Wolves Change Rivers: Query for Trophic Cascades

!MATCH path = (:Animal {Entity:"Wolves"})-[*]->(:Landscape {Entity:"Rivers"})WITH extract(node IN nodes(path) | node.Yellowstone) AS factor, rand() AS numberRETURN factor AS How_Wolves_Affect_RiverStabilityORDER BY numberLIMIT 5

Page 56: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

How Wolves Change Rivers: Query for Trophic Cascades

!MATCH path = (:Animal {Entity:"Wolves"})-[*]->(:Landscape {Entity:"Rivers"})WITH extract(node IN nodes(path) | node.Yellowstone) AS factor, rand() AS numberRETURN factor AS How_Wolves_Affect_RiverStabilityORDER BY numberLIMIT 5

Page 57: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014
Page 58: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014
Page 59: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014
Page 60: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014
Page 61: Graph All The Things! - Andreas Kollegger @ Neo4j GraphDays: #AllYouCanGraph Palo Alto 2014

Thank you!Think about relationships,

Follow paths, Find your graph