How iuliasapungiu/nyc_taxi_duckdb works
This repository is a DuckDB analytics warehouse for NYC Yellow Taxi trips. The principal workflow is to ingest TLC trip and zone data, clean it, model a star-schema mart, validate it, then run analytical queries and visualize their results. A separate benchmark compares queries against DuckDB, Parquet, and CSV representations. The README documents the end-to-end stages; sampled Python shows orchestration, result export, plotting, and benchmarking, but the SQL implementations themselves were not sampled, so their internal details are not expanded here.
Main entry points: build.py Build runner · 01_raw.sql Raw ingestion · analyse.py Analysis runner · 02_staging.sql Trip cleaning
Components 15
Warehouse pipeline
- Build runner
build.py - Raw ingestion
sql/01_raw.sql - Trip cleaning
sql/02_staging.sql - Star schema
sql/03_star_schema.sql - Quality checks
sql/04_checks.sql - DuckDB warehouse
Analytics outputs
- Analysis runner
analyse.py - Analysis queries
analysis - CSV results
results - Chart generation
analysis/plot_charts.py
Performance evaluation
- Format benchmark
performance.py - Parquet and CSV exports
Other components
- Analyst
- TLC trip data
- Zone lookup
Connections 25
- Analyst → Build runner: runs build
README.md - TLC trip data → Raw ingestion: supplies trips
README.md - Zone lookup → Raw ingestion: supplies zones
README.md - Build runner → Raw ingestion: executes SQL
build.py - Build runner → Trip cleaning: executes SQL
build.py - Build runner → Star schema: executes SQL
build.py - Build runner → Quality checks: runs checks
build.py - Raw ingestion → Trip cleaning: feeds cleaned layer
README.md - Trip cleaning → Star schema: feeds mart
README.md - Raw ingestion → DuckDB warehouse: stores raw layer
README.md - Trip cleaning → DuckDB warehouse: stores staging layer
README.md - Star schema → DuckDB warehouse: stores mart
README.md - Quality checks → DuckDB warehouse: validates tables
README.md - Analyst → Analysis runner: runs analysis
README.md - Analysis runner → Analysis queries: loads SQL
analyse.py - Analysis runner → DuckDB warehouse: queries warehouse
analyse.py - Analysis runner → CSV results: writes CSVs
analyse.py - Analysis queries → DuckDB warehouse: analyzes mart
README.md - Analyst → Chart generation: runs charts
README.md - Chart generation → CSV results: reads CSVs
analysis/plot_charts.py - Chart generation → Analyst: produces charts
analysis/plot_charts.py - Analyst → Format benchmark: runs benchmark
README.md - Format benchmark → DuckDB warehouse: queries and exports
performance.py - Format benchmark → Parquet and CSV exports: writes formats
performance.py - Parquet and CSV exports → Format benchmark: benchmarks reads
performance.py