Training curriculum¶
Welcome to the ddigraph training curriculum. This course teaches you to turn DDI metadata files into graphs, and to use those graphs: to query them, check them, publish them as linked data, and load them into the database you use. You need some Python and a command line. You need no prior experience with DDI, graphs or Neo4j.
This is the place to learn ddigraph step by step. The user guide explains how it works, the backend pages cover one database each, and the CLI reference lists every option.
What this course covers
You will read DDI-Codebook, DDI-Lifecycle and DDI-CDI files, look at their graphs before loading them, and query them in memory. You will check them against the DDI schemas and SHACL shapes, and load them into Neo4j. Then you will export them as RDF, keep their history, build your own pipeline, and ground a language model in them. Last, you take the same graph to NetworkX, pandas, SQL, an RDF store, Gremlin, and an HTTP or Arrow Flight service.
Every example is tested
Each code block in the modules runs in the project's tests, and the output each module shows is checked against what the code really prints. Blocks that need a server run against Neo4j, PostgreSQL and Gremlin in CI. Only the two calls to a language model are not run, because they need an API key.
How the course is organized¶
The curriculum has 23 modules in three tiers. Each module lists its prerequisites at the top, and the table below repeats them.
- Tier 1: Foundations (Modules 1 to 7). You install ddigraph, read your first files, and learn the graph model. You need no database until Module 7, which loads a file into Neo4j.
- Tier 2: Advanced (Modules 8 to 16). Linked data, code lists and classifications, one query on many engines, history, your own pipeline, hard files, and language models. It ends with the capstone projects.
- Tier 3: Backend tracks (Modules 17 to 23). One module per backend. They are optional: take the ones you use. Each says whether it needs a server, and four of them run in your Python process with no server at all: NetworkX, pandas, the DuckDB part of SQL, and RDF with Oxigraph.
The times are the ones each module gives: working alone (self-paced), or in a class with an instructor (instructor-led).
| # | Module | Self-paced | Instructor-led | Prerequisites | Server |
|---|---|---|---|---|---|
| Tier 1: Foundations | |||||
| 1 | What DDI metadata is, and why a graph | 30 min | 45 min | None | None |
| 2 | Set up your environment | 30 min | 45 min | 1 | None |
| 3 | Look before you load | 30 min | 45 min | 2 | None |
| 4 | Nodes, edges and identity | 45 min | 60 min | 3 | None |
| 5 | Ask the graph questions in memory | 50 min | 65 min | 4 | None |
| 6 | Prove it is right: XSD and SHACL | 45 min | 60 min | 5 | None |
| 7 | Your first graph database: Neo4j | 50 min | 70 min | 6 | Neo4j |
| Tier 2: Advanced | |||||
| 8 | Linked data: RDF out and back in | 45 min | 60 min | 7 | None |
| 9 | Code lists and classifications: SKOS and XKOS | 45 min | 60 min | 8 | None |
| 10 | One query, many engines | 45 min | 60 min | 9 | None |
| 11 | Reload, history and differences | 40 min | 55 min | 10 | None |
| 12 | Build your own pipeline and lens | 50 min | 65 min | 11 | None |
| 13 | Big, broken and untrusted files | 50 min | 65 min | 12 | None |
| 14 | Ground a language model in the graph | 40 min | 55 min | 13 | None |
| 15 | Give a model tools over the graph | 45 min | 60 min | 14 | None |
| 16 | Capstone projects | 60 min | 80 min | 1–15 | None |
| Tier 3: Backend tracks (optional) | |||||
| 17 | Neo4j in depth | 60 min | 80 min | 7 | Neo4j |
| 18 | NetworkX | 40 min | 55 min | 5 | None |
| 19 | pandas | 35 min | 50 min | 5 | None |
| 20 | SQL with DuckDB and PostgreSQL | 50 min | 65 min | 10 | PostgreSQL, for part of it |
| 21 | RDF and SPARQL with Oxigraph | 45 min | 60 min | 8 | None |
| 22 | Gremlin | 40 min | 55 min | 7 | Gremlin |
| 23 | Serve the graph: HTTP and Arrow Flight | 50 min | 65 min | 11 | None |
Each module starts with numbered learning objectives (O1, O2, ...): what you can do by the end of it. Each exercise and quiz question is tagged with the objectives it practises, for example Exercise 2 (O3). Each module ends with a Check yourself list, one line per objective. Tick each line before you move on. For a line you cannot tick, redo the exercises with that tag.
Where do I start?¶
Pick the row that fits you best.
| I am a... | Start at | I can skim | Spend extra time on |
|---|---|---|---|
| Data archivist (know DDI, new to graphs) | Module 1 | Module 1 | Modules 3, 4 and 6, then Module 8 for linked data |
| Survey methodologist | Module 1 | Module 2 | Modules 4, 5 and 9: questions, variables and code lists |
| Data engineer | Module 2 | Modules 1 and 3 | Modules 7, 11 and 12, then your backend's track |
| Developer building on ddigraph | Module 2 | Modules 1 and 3 | Modules 4, 10 and 12, then Modules 13 and 23 |
| Analyst who wants tables or networks | Module 1 | Module 6 | Modules 4 and 5, then Modules 18, 19 and 20 |
The big picture¶
This is the process you will learn:
flowchart LR
file["DDI file<br>Codebook, Lifecycle or CDI"] --> look["detect and preview"]
look --> parse["ddigraph.ir.parse<br>the graph as a stream"]
parse --> memory["memory lens<br>and ddigraph.query"]
parse --> check["XSD and SHACL"]
parse --> neo4j["Neo4j"]
parse --> rdf["RDF and SPARQL"]
parse --> others["NetworkX, pandas,<br>SQL, Gremlin"]
parse --> store["the store:<br>history and diffs"]
Suggested schedules¶
Each total adds up the modules' own times, without breaks or setup.
| Format | Modules | Instructor-led | Self-paced | Covers |
|---|---|---|---|---|
| Half-day workshop | 1–4 | 3 h 15 min | 2 h 15 min | What DDI is, setup, a first look at a file, and the graph model |
| Full-day workshop | 1–7 | 6 h 30 min | 4 h 40 min | All of Tier 1, up to a first load into Neo4j |
| Three-day intensive | 1–16 | 15 h 50 min, about 5 h 20 min a day | 11 h 40 min | Tiers 1 and 2, with the capstone |
| Backend day | your pick of 17–23 | up to 7 h 10 min | up to 5 h 20 min | The tracks for the backends you use |
| Self-paced | 1–23, one module per session | 17 h | 23 sessions of 30 to 60 min, about 4 to 6 weeks |
Setup¶
Module 2 walks you through it. In short: install ddigraph with the extras the course uses, clone the repository for its sample files, and work from the clone's root. Docker runs the servers that Module 7 and some backend tracks need. Neo4j Aura Free works too.
Supplementary resources¶
- Instructor guide: schedules, setup, and tips for each module
- Cheat sheet: the commands and Python calls on one page
- Answer keys: every answer on one page, for instructors. Learners can open the answer under each exercise instead.
- User guide: how a load works
- CLI reference: every command and option
- Glossary: the terms the course uses