Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
GraphConnect Europe 2016 Schedule graph

The GraphConnect Europe 2016 Schedule Graph

Yey! It’s that time of the year again! We are full-steam getting ready for the Bi-Yearly Festival of Graphs also known as GraphConnect. There’s another great conference lined up for us. The entire Neo4j crew will be there in full force - and of course we had to create another Schedule graph - just for fun.

A Google Sheet as the main repository

I had to of course start from the schedule on the GraphConnect website, and convert that into a google sheet with all the data. Once I had that, I could add the data pretty easily with this model:

Screen%2BShot%2B2016 04 07%2Bat%2B16.47.00

Very simple - but it’s so much nicer when you can make it interactive and load it into Neo4j. Let’s do that. Let’s load that data into this graphgist.

load csv with headers from "https://docs.google.com/a/neotechnology.com/spreadsheets/d/10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg/export?format=csv&id=10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg&gid=16326967" as csv
merge (d:Day {date: toInt(csv.day)});

//connect the days
match (d:Day), (d2:Day)
where d.date = d2.date-1
merge (d)-[:PRECEDES]-(d2);

//add the rooms, tracks, speakers and speaker's companies
load csv with headers from "https://docs.google.com/a/neotechnology.com/spreadsheets/d/10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg/export?format=csv&id=10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg&gid=16326967" as csv
merge (r:Room {name: csv.room})
merge (t:Track {name: csv.track})
merge (p:Person {name: csv.speaker, title: csv.title})
merge (c:Company {name: csv.company})
merge (p)-[:WORKS_FOR]->(c);

//add the timeslots to each day
load csv with headers from "https://docs.google.com/a/neotechnology.com/spreadsheets/d/10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg/export?format=csv&id=10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg&gid=16326967" as csv
match (d:Day {date: toInt(csv.day)})
merge (t1:Time {time: toInt(csv.starttime)})-[:PART_OF]->(d)
merge (t2:Time {time: toInt(csv.endtime)})-[:PART_OF]->(d);

//add the sessions and connect them up
load csv with headers from "https://docs.google.com/a/neotechnology.com/spreadsheets/d/10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg/export?format=csv&id=10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg&gid=16326967" as csv
match (t2:Time {time: toInt(csv.endtime)})-[:PART_OF]->(d:Day {date: toInt(csv.day)})<-[:PART_OF]-(t1:Time {time: toInt(csv.starttime)}), (r:Room {name: csv.room}), (t:Track {name: csv.track}), (p:Person {name: csv.speaker, title: csv.title})
merge (s:Session {title: csv.talk})
merge (s)<-[:SPEAKS_IN]-(p)
merge (s)-[:IN_ROOM]->(r)
merge (s)-[:STARTS_AT]->(t1)
merge (s)-[:ENDS_AT]->(t2)
merge (s)-[:IN_TRACK]->(t);

Let’s take a look at what we have now:

Ok - so that looks like a big fat hairball. Not very useful. So let’s try to zoom in a bit, and run a simple query over our graph: let’s find a couple of sessions in Day 1:

match (d:Day {date:20160426})<--(t:Time)<--(s:Session)--(connections)
return d,t,s,connections
limit 50

and here’s a sample of the graph:

Let’s do another query:

match path = allshortestpaths( (p1:Person)-[*]-(p2:Person) )
where p1.name contains "Hunger"
and p2.name contains "Webber"
return path

and display the result

Let’s now look at a link between a person (Jim Webber, of Neo fame) and an Organisation (ICIJ, of PanamaPaper fame).

match (c:Company {name:"ICIJ"}), (p:Person {name:"Jim Webber"}),
path = allshortestpaths( (c)-[*]-(p) )
return path

and again diplay the result:

Last one for fun: let’s look at the sessions that have more than one speaker:

match (s:Session)-[r:SPEAKS_IN]-(p:Person)
with s, collect(p) as person, count(p) as count
where count > 1
return s,person

and display it:

Just a start…​

There are so many other things that we could look at. Use the console below to explore if you are interested in more.

I hope this gist was interesting for you, and that we will see each other soon.

This gist was created by Rik Van Bruggen

create index on :Company(name);
create index on :Day(date);
create index on :Time(time);
create index on :Room(name);
create index on :Session(title);
create index on :Track(name);
schema await;
// schedule
https://docs.google.com/a/neotechnology.com/spreadsheets/d/10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg/export?format=csv&id=10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg&gid=16326967
//add the days
load csv with headers from "https://docs.google.com/a/neotechnology.com/spreadsheets/d/10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg/export?format=csv&id=10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg&gid=16326967" as csv
merge (d:Day {date: toInt(csv.day)});
//connect the days
match (d:Day), (d2:Day)
where d.date = d2.date-1
merge (d)-[:PRECEDES]-(d2);
//add the rooms, traxcks, speakers and speaker's companies
load csv with headers from "https://docs.google.com/a/neotechnology.com/spreadsheets/d/10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg/export?format=csv&id=10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg&gid=16326967" as csv
merge (r:Room {name: csv.room})
merge (t:Track {name: csv.track})
merge (p:Person {name: csv.speaker, title: csv.title})
merge (c:Company {name: csv.company})
merge (p)-[:WORKS_FOR]->(c);
//add the timeslots to each day
load csv with headers from "https://docs.google.com/a/neotechnology.com/spreadsheets/d/10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg/export?format=csv&id=10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg&gid=16326967" as csv
match (d:Day {date: toInt(csv.day)})
merge (t1:Time {time: toInt(csv.starttime)})-[:PART_OF]->(d)
merge (t2:Time {time: toInt(csv.endtime)})-[:PART_OF]->(d);
//add the sessions and connect them up
load csv with headers from "https://docs.google.com/a/neotechnology.com/spreadsheets/d/10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg/export?format=csv&id=10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg&gid=16326967" as csv
match (t2:Time {time: toInt(csv.endtime)})-[:PART_OF]->(d:Day {date: toInt(csv.day)})<-[:PART_OF]-(t1:Time {time: toInt(csv.starttime)}), (r:Room {name: csv.room}), (t:Track {name: csv.track}), (p:Person {name: csv.speaker, title: csv.title})
merge (s:Session {title: csv.talk})
merge (s)<-[:SPEAKS_IN]-(p)
merge (s)-[:IN_ROOM]->(r)
merge (s)-[:STARTS_AT]->(t1)
merge (s)-[:ENDS_AT]->(t2)
merge (s)-[:IN_TRACK]->(t);
//ALL IN ONE QUERY
//add the hosts
load csv with headers from "https://docs.google.com/a/neotechnology.com/spreadsheets/d/10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg/export?format=csv&id=10sswmRmY5FjYMLU5c5rJlXr4m9Idxw7tC8OImb7v4Yg&gid=16326967" as csv
merge (d:Day {date: toInt(csv.day)})
with csv
match (d:Day), (d2:Day)
where d.date = d2.date-1
merge (d)-[:PRECEDES]-(d2)
with csv
merge (r:Room {name: csv.room})
merge (t:Track {name: csv.track})
merge (p:Person {name: csv.speaker, title: csv.title})
merge (c:Company {name: csv.company})
merge (p)-[:WORKS_FOR]->(c)
with csv
match (d:Day {date: toInt(csv.day)})
merge (t1:Time {time: toInt(csv.starttime)})-[:PART_OF]->(d)
merge (t2:Time {time: toInt(csv.endtime)})-[:PART_OF]->(d)
with csv
match (t2:Time {time: toInt(csv.endtime)})-[:PART_OF]->(d:Day {date: toInt(csv.day)})<-[:PART_OF]-(t1:Time {time: toInt(csv.starttime)}), (r:Room {name: csv.room}), (t:Track {name: csv.track}), (p:Person {name: csv.speaker, title: csv.title})
merge (s:Session {title: csv.talk})
merge (s)<-[:SPEAKS_IN]-(p)
merge (s)-[:IN_ROOM]->(r)
merge (s)-[:STARTS_AT]->(t1)
merge (s)-[:ENDS_AT]->(t2)
merge (s)-[:IN_TRACK]->(t);
//Querying the GraphConnect Europe 2016 Schedule
//Look at day 2
match (d:Day {date:20160426})<--(t:Time)<--(s:Session)--(connections)
return d,t,s,connections
limit 50
//Look at two people
match (p1:Person), (p2:Person),
path = allshortestpaths( (p1)-[*]-(p2) )
where p1.name contains "Hunger"
and p2.name contains "Webber"
return path
//Look at a person and a company
match (c:Company {name:"ICIJ"}), (p:Person {name:"Jim Webber"}),
path = allshortestpaths( (c)-[*]-(p) )
return path
//Look at sessions with more than one speaker
match (s:Session)-[r:SPEAKS_IN]-(p:Person)
with s, collect(p) as person, count(p) as count
where count > 1
return s,person
day starttime endtime talk speaker company title room track
20160426 900 945 Registration & Coffee All All All Central area Fika
20160426 945 1000 Welcome and Introduction to GraphConnect Rik Van Bruggen Neo Technology Regional VP of Sales Keynote room Keynote
20160426 945 1000 Welcome and Introduction to GraphConnect Holger Temme Neo Technology Regional Director Keynote room Keynote
20160426 1000 1100 Opening Keynote Emil Eifrem Neo Technology CEO and Founder Keynote room Keynote
20160426 1100 1130 Fika All All All Central area Fika
20160426 1130 1200 Graph Visualisation for the Use of Investigative Journalism Mar Cabra ICIJ Head of the Data & Research Unit Fleming, 3rd floor Business Impact
20160426 1200 1230 Semantic PIM: Using a Graph Data Model at Toy Manufacturer Schleich Dr. Andreas Weber Schleich VP Operations Fleming, 3rd floor Business Impact
20160426 1130 1200 Tuning Your Cypher Petra Selmer Neo Technology Developer Whittle, 3rd floor Neo4j Deep-Dive
20160426 1130 1200 Tuning Your Cypher Mark Needham Neo Technology Developer Whittle, 3rd floor Neo4j Deep-Dive
20160426 1200 1230 Importing Data Mark Needham Neo Technology Developer Whittle, 3rd floor Neo4j Deep-Dive
20160426 1200 1230 Importing Data Michael Hunger Neo Technology Developer Evangelist Whittle, 3rd floor Neo4j Deep-Dive
20160426 1130 1200 The Power of Business-Leader Networks Enabled by Neo4j Tilo Walter Kantwert Director Gielgud, 2nd floor Neo4j in Action
20160426 1200 1230 How the Power of Graphs Helps Deliver our Strategic Vision Gregory Roberts Packt Publishing Senior Data Analyst Gielgud, 2nd floor Neo4j in Action
20160426 1130 1150 Creating an Innovative Task Management Engine Miha Zagar Mativy Softare Developer Olivier, 2nd floor Lightning Talks
20160426 1150 1210 Pushing the Evolution of Software Analytics with Graphs Dirk Mahler buschmais Senior Consultant Olivier, 2nd floor Lightning Talks
20160426 1210 1230 Taking Citizens into a Graph and Keeping It Up to Date Irfan Nuri Karaca Kale Yazilim Project manager Olivier, 2nd floor Lightning Talks
20160426 1130 1730 GraphClinics Neo Technology Consultants, Engineers and Developer Evangelists Neo Technology Neo4j Engineer Britten, 3rd floor GraphClinics
20160426 1500 1515 Lunch All All All Central area Fika
20160426 1400 1430 Graph Data to Stakeholder Viewpoint Chris Tanner Tom Sawyer Software Solutions Engineer Fleming, 3rd floor Business Impact
20160426 1430 1500 Inside the Spider’s Web: Dependency Management with Neo4j Stelios Gerogiannakis Royal Bank of Scotland Senior Engineer Fleming, 3rd floor Business Impact
20160426 1400 1430 Neo4j 3.0 Unified Drivers Nigel Small Neo Technology Developer Whittle, 3rd floor Neo4j Deep-Dive
20160426 1400 1430 Neo4j 3.0 Unified Drivers Stefan Plantikow Neo Technology Developer Whittle, 3rd floor Neo4j Deep-Dive
20160426 1430 1500 Building Spring Data Neo4j 4.1 Applications Like A Superhero Luanne Misquitta GraphAware Consultant Whittle, 3rd floor Neo4j Deep-Dive
20160426 1400 1430 An Integrative Framework for Data Management in Systems Biology and Medicine Irina Balaur European Institute for Systems Biology and Medicine Researcher Gielgud, 2nd floor Neo4j in Action
20160426 1430 1500 How Go and Neo4j enabled the FT to Deliver at Speed Dan Murphy Financial Times Senior Semantic Metadata and DevOps Gielgud, 2nd floor Neo4j in Action
20160426 1400 1420 Navigating All the Knowledge James Weaver Pivotal Consultant Technologist Olivier, 2nd floor Lightning Talks
20160426 1420 1440 Creating the Best Teams Ever with Collaborative Filtering Maurits van der Goes Part-up Lead developer Olivier, 2nd floor Lightning Talks
20160426 1440 1500 Enterprise Data Integration with a new JDBC Driver for Neo4j 3.0 Lorenzo Speranzoni LARUS Business Automation Founder & CEO Olivier, 2nd floor Lightning Talks
20160426 1500 1515 Fika All All All Central area Fika
20160426 1545 1615 Building Consumer Trust through Transparency, Compliance and Sustainability in the Food Industry Julien Mazerolle Trace One CTO Fleming, 3rd floor Business Impact
20160426 1545 1615 Building Consumer Trust through Transparency, Compliance and Sustainability in the Food Industry Julien Durand Trace One Product Manager Fleming, 3rd floor Business Impact
20160426 1515 1545 Scaling Graphs into Production Ian Robinson Neo Technology Engineer Whittle, 3rd floor Neo4j Deep-Dive
20160426 1545 1615 Data Science and Recommendations Nicole White Neo Technology Data Scientist Whittle, 3rd floor Neo4j Deep-Dive
20160426 1515 1545 WayBlazer Cognitive Conversion Application, Leveraging by Watson & Neo4j Ivan Portilla IBM IT Architect Gielgud, 2nd floor Neo4j in Action
20160426 1545 1615 Enterprise Data Management with a Flexible Graph Platform Axel Morgner structr Founder, Owner and Managing Director Gielgud, 2nd floor Neo4j in Action
20160426 1515 1535 Securely Deploying Neo4j into AWS Benjamin Nussbaum GraphGrid Software Architect Olivier, 2nd floor Lightning Talks
20160426 1535 1555 Building a Repository of Biomedical Ontologies with Neo4j Simon Jupp European Bioinformatics Institute Bioinformatician Olivier, 2nd floor Lightning Talks
20160426 1555 1615 JCypher, Issue Closed: Database-Design & Mapping Dr. Wolfgang Schützelhofer IoT Solutions Managing Director Olivier, 2nd floor Lightning Talks
20160426 1615 1630 Fika All All All Central area Fika
20160426 1630 1700 Digitalization and Optimizing Business Performance at Hästens Anders Ekström NetConsult Business Developer and CEO Fleming, 3rd floor Business Impact
20160426 1630 1700 Digitalization and Optimizing Business Performance at Hästens Kent Lovestjärna Hästens Digital Media Manager Fleming, 3rd floor Business Impact
20160426 1630 1700 NoSQL Polyglot Persistence: Tools and Integrations William Lyon Neo Technology Developer Evangelist Whittle, 3rd floor Neo4j Deep-Dive
20160426 1630 1700 Who Cares What Beyonce Ate for Lunch? Alicia Powers Fino Consulting Data Science Lead Gielgud, 2nd floor Neo4j in Action
20160426 1630 1645 Governing Multichannel Services with Graphs Alberto De Lazzari Veneto Banca SPA IT Architect Olivier, 2nd floor Lightning Talks
20160426 1630 1645 Governing Multichannel Services with Graphs Nicola Camillo Veneto Banca SPA IT Project Manager Olivier, 2nd floor Lightning Talks
20160426 1700 1730 Fika All All All Central area Fika
20160426 1730 1800 How the ICIJ Used Neo4j to Unravel the Panama Papers Mar Cabra ICIJ Head of the Data & Research Unit Keynote room Keynote
20160426 1800 1845 Closing Keynote Jim Webber Neo Technology Chief Scientist Keynote room Keynote
20160426 1845 2000 Graph Reception All All All Central area Fika
20160425 930 1730 Neo4j Fundamentals Neo4j Engineer Neo Technology Neo4j Engineer Skillsmatter CodeNode Training
20160425 930 1730 Graph Data Modelling with Neo4j Neo4j Engineer Neo Technology Neo4j Engineer Skillsmatter CodeNode Training
20160425 930 1730 Advanced Neo4j Deployment Neo4j Engineer Neo Technology Neo4j Engineer Skillsmatter CodeNode Training
20160425 930 1730 Build a recommendation engine with Neo4j Neo4j Engineer Neo Technology Neo4j Engineer Skillsmatter CodeNode Training
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.