We walk through the steps of building an application with Grakn. We will begin with how to construct a model of the scenario, moving on to talk about how to use reasoning to reach concrete insights, and go further to use Analytics for a deeper understanding of the dataset.
Finally, we will show the specific usefulness of Grakn for applications in planning, logistics and operations, as we create a journey planner to get us from A to B across the London Underground.
Blog post: https://blog.grakn.ai/planning-logistics-and-operations-modelling-the-london-tube-network-in-grakn-7c03baff65c6
Github code: https://github.com/graknlabs/grakn_examples/tree/master/tube_network_example
2. Overall Objectives:
o A quick introduction to Grakn
o Get in deep with some real data
o Look for insights into the tube network that
aren’t obvious
o Build a journey planner to find a efficient
path through the network
3. What is a knowledge graph?
Knowledge schema
Flexible Entity-Relationship concept-
level schema to build knowledge
models
Model complex
domains
Automated Reasoning
Automated deductive reasoning of data
points during runtime(OLTP)
Deriveimplicitfacts&simplification
Distributed Analytics
Automated distributed algorithms
(BSP) as a language (OLAP)
Automatedlargescaleanalytics
Higher-Level Language
Strong abstraction over low-level
constructs and
complex relationships
Easier toworkwith
complexdata
9. The Raw Data
Tube Stations
• Naptan-id
• Name
• Latitude
• Longitude
Tube Lines
• Name/id
Zones
• Name
Routes
• Naptan-id of origin
• Naptan-id of end destination
• Tube line operated by
Timetables
• Schedule of duration to stops along the route
(we derive tube-stop ordering from this)
• Tube line operated by
12. Which way to go?
station station
route-section
route-section
service
serviceserviceserviceservice
route-section route-sectionroute-sectionroute-section
tunnel
beginning end
station station
route-
section
route-
section
route-
section
route-
section
route-
section
to
to
to
to
to
from
from
from
from
from
5n
5 x n
duration
has
station
route-
section
route-
section
route-
section
route-
section
route-
section
to
to
to
to
to
from
from
from
from
from
A nicer way
n
22. Other database solutions are just that – data storage, not knowledge storage
Data Data
Knowledge
?
From Data to knowledge
23. From Data to knowledge
Facilitated by:
• Natural Representation of the interconnectedness of data
• Ability to make long highly-chained queries
• Capturing knowledge in the form of rules, applied at the database-level
• Easy access to the knowledge via natural queries
• Logical reasoning by deduction over the known information
Editor's Notes
Introduce myself and what I’m doing at Grakn
Grakn has a database server, to which you can send requests
The reason that Grakn is the database for AI
Differentiation between database and knowledgebase
The raw data we have contains a lot of information, but it’s not in a format that’s not easy to digest. We want to store that data in an expressive way, that lets us build simplified representations of the information.
Take home point: the tube map we all know is a summary of what’s really going on
Demonstrates the forking nature of the central line
A contrast of two schema approaches
-Starting to look at good schema design and break old habits
-Get rid of only thinking in terms of “has a”, think role-players
-Relationships are often conceptual, as in these cases
-What makes a tunnel a tunnel?
-n-ary relationships
-many roleplayers in a relationship
Demonstrates the forking nature of the central line
Application is pulling information from Grakn in real time
G – centrality using degree ||| K – centrality using k-core ||| R - "compute centrality of station, in [station, route], using degree;”
Green Park – Temple
Waterloo – Oxford Circus – King’s Cross
Waterloo – Green Park – King’s Cross
Differentiation between database and knowledgebase