Skip to content

Latest commit

 

History

History
109 lines (83 loc) · 4.28 KB

README.md

File metadata and controls

109 lines (83 loc) · 4.28 KB

TMDB TV Shows Graph Tutorial

TV Shows

Dataset

Graph Data Model

                    ┌──────────┐
                    │  Genre   │
                    └────▲─────┘
                         │ IN_GENRE
┌──────────┐       ┌─────┴─────┐       ┌──────────┐
│ Creator  │◄──────│  TVShow   │──────►│ Network  │
└──────────┘       └─────┬─────┘       └──────────┘
  CREATED_BY             │              AIRED_ON
                    ┌────┴────┐
               ┌────┴──┐  ┌──┴─────┐
               │Country│  │Language│
               └───────┘  └────────┘
            ORIGINATED_IN   SPOKEN_IN

Node Properties

Node Properties
TVShow id, name, seasons, episodes, language, vote_count, vote_average, overview, poster_url, first_air_date, last_air_date, popularity, type, status, tagline
Genre name
Creator name
Network name
Company name
Country name
Language name

Relationships

Relationship From To Properties
IN_GENRE TVShow Genre —
CREATED_BY TVShow Creator —
AIRED_ON TVShow Network —
PRODUCED_BY TVShow Company —
ORIGINATED_IN TVShow Country —
SPOKEN_IN TVShow Language —

Quick Start

Prerequisites

# using pip
pip install -r requirements.txt

Start Graphmind

# Option 1: Docker (recommended)
docker run -d --name graphmind \
  -p 6379:6379 -p 8080:8080 \
  fabischk/graphmind:latest

# Option 2: Binary
graphmind

# Option 3: From source
cargo run

Run the Import

cd graphmind_tutorials/tmdb_tv_shows

# Using uv (recommended)
uv run marimo run import_tv_shows.py

# Or interactive/presentation mode
uv run marimo edit import_tv_shows.py

# Or without uv
marimo run import_tv_shows.py

Explore

  1. Open the visualizer: http://localhost:8080
  2. Select the tmdb graph in the tenant selector
  3. Run exploration queries from tmdb_tv_shows.cypher in the Cypher editor
  4. Try: MATCH (s:TVShow)-[:IN_GENRE]->(g:Genre) RETURN s, g LIMIT 50

Expected Graph Size (top 500 shows)

Entity Count
TV Shows ~500
Genres ~20
Creators ~400
Networks ~100
Countries ~50
Languages ~30
Relationships ~2,500+