KG 101: Hands-on coding in Python

A Talk by Paco Nathan and François Scharffe
Derwen, Inc. and Knowledge Connexions / KGC / The Data Chefs

Register to watch this content

By submitting you agree to the Terms & Privacy Policy
Watch this content now

About this talk

This tutorial provides an introduction to building knowledge graphs by using open source libraries in Python. We’ll introduce the key concepts and abstractions, discuss engineering trade-offs, and emphasize hands-on coding exercises.

The coding exercises are based on progressive examples based on managing the content for a website, which illustrate how to integrate the use of:

  • rdflib - RDF triples, SPARQL queries, serialization
  • arrow - Parquet serialization of RDF graphs
  • networkx - graph algorithms
  • pyvis - interactive visualization
  • gensim - embedding (clean up annotations)
  • pslpython - probabilistic soft logic, to apply rules for graph-based inference, link prediction, testing data quality of annotations, etc.

Plus related use of pandas, numpy, matplotlib, pylev, and other libraries that help with building and analyzing KGs in open source Python.

We will work in Jupyter notebooks, available from a public repository on GitHub, which can be run locally. Semantic technologies used within these examples include OWL, FOAF, XSD (for literals), and some SKOS, which are represented in Turtle and JSON-LD formats.

Participants are encouraged to ask questions throughout the lectures, exercises, and during breaks.


  • Some coding experience in Python (you can read a 20-line program)
  • Interest in use cases that require knowledge graph representation

Preparation before class:

  • git clone
  • fill out the online survey
  • join our Slack channel for the class


  • Python developers who need to work with KGs
  • Data Scientists and Machine Learning Engineers
  • Technical Leaders who want hands-on KG implementation experience

Key Takeaways:

  • Hands-on experience with popular open source libraries in Python for building KGs
  • Coding examples that can be used as starting points for your own KG projects
  • Understanding trade-offs for different approaches to building KGs

Categories covered by this talk

Paco Nathan

Known as a "player/coach", with core expertise in data science, natural language, machine learning, cloud computing; 38+ years tech industry experience, ranging from Bell Labs to early-stage start-ups. Advisor for Amplify Partners, IBM Data Science Community, Recognai, KUNGFU.AI, Primer. Lead committer PyTextRank. Formerly: Director, Community Evangelism @ Databricks and Apache Spark. Cited in 2015 as one of the Top 30 People in Big Data and Analytics by Innovation Enterprise.

François Scharffe

On a mission to show the value of knowledge engineering.

Proudly supported by

Want to sponsor this event? Contact Us.

Loading content...

Loading content...