▌ daily-comparative-data-video.md
▒ PATH:
▒ SIZE: 2.5 KB
▒ MODIFIED: 2026-05-29 09:03
MemPalace Archive/projects/daily-comparative-data-video.md▒ SIZE: 2.5 KB
▒ MODIFIED: 2026-05-29 09:03
# Daily Comparative Data Video
## Overview
Short-form animated bar chart race video posted daily at 3pm HKT to @comparativedata1 YouTube channel. 1080×1920 portrait, ~86s. World Bank data.
## Cron Job
- **ID:** `bbfe42b554f8`
- **Schedule:** `0 15 * * *` (3pm Hong Kong time, daily)
- **Instance:** Henry (main Nick instance)
- **Output:** `/Users/Shared/hf-demo/gdp-animation/video_daily.mp4`
## 11-Topic Cycle
Topic = (day_of_year - 2) % 11
1. **GDP per capita, PPP** — poorest 20 (NY.GDP.PCAP.PP.KD)
2. **Military Expenditure** — top 20 % GDP (MS.MIL.XPND.GD.ZS)
3. **Life Expectancy** — lowest 20 (SP.DYN.LE00.IN)
4. **CO2 per Capita** — top 20 (EN.ATM.CO2E.PC) ← added
5. **Population** — smallest 20 (SP.POP.TOTL)
6. **Internet Users** — lowest 20 (IT.NET.USER.ZS)
7. **Birth Rate** — highest 20 (SP.DYN.TFRT.IN)
8. **GINI Index** — highest 20 (SI.POV.GINI) ← added
9. **Unemployment Rate** — highest 20 (SL.UEM.TOTL.ZS)
10. **Health Expenditure/capita** — top 20 (SH.XPD.CHEE.PC.CD) ← added
11. **Fertility Rate** — highest 20 (SP.DYN.TFRT.IN)
## Script
- `/tmp/daily_comparative_video.py` — main generator
- Fetches World Bank API fresh each run
- Renders frames with PIL → ffmpeg compile
## Output Files
- Video: `/Users/Shared/hf-demo/gdp-animation/video_daily.mp4`
- Frames: `/tmp/daily_frames/frame_%05d.png`
- Music: `/tmp/interstellar_85s.mp3` (85s trim, 30% vol)
- Flags: `/tmp/gdp_flags/` (flagcdn.com 80px PNGs)
## Video Specs
- Duration: ~86s (3s title + 80s animation + 3s end card)
- Resolution: 1080×1920 (9:16 portrait)
- FPS: 30 | H.264 MP4 + AAC 192kbps
- Style: dark BG (#0a0a0f), cyan accent (#40c8f0), gold title (#f0c040)
## YouTube Description Format
"🔥 {HOOK}
{ FUN FACT about #1 country }
This motion graphics video was created with Adobe After Effects.
Data sourced from World Bank. For informational purposes only — not financial advice.
📊 {topic} data via @comparativedata1 #worlddata #dataviz #motiongraphics"
## Dependencies
- Python PIL/Pillow, urllib, ffmpeg
- World Bank API (no key needed)
- Interstellar music at `/Volumes/My Shared Files/UTM/Music/`
## HyperFrames Mode (May 2026 upgrade)
- Now uses `npx hyperframes render` instead of raw ffmpeg
- Run from `/Users/Shared/hf-demo/`
- Scene-by-scene from AI-generated images
## Recent Runs
- **May 28 15:02** — Topic 5/11: Birth Rate (highest 20 countries). Some fetch errors (batch 60 timeout, batch 80 403). 154 countries / 5166 records fetched. Output: 102s, 4.6MB video.