S7-I-R1 / 🎓 Master Prep Analytics / Live Case
Master Prep Analytics
A research cockpit for adaptive testing, cognition tracking, and self-quantified learning. Connected to the same Google Sheet as sphere-i-science.vercel.app.
📊 Data flow
🎓 Master Training
📊 Google Sheets
Same Sheet as
sphere-i-science
📈 This Dashboard
Reads via Apps Script
+ localStorage
Goal vs Reality
Accuracy Trend
Signals
Accuracy by Subject
Weak Zones
Session Trend & Forecast
Effort vs Accuracy
Recent Sessions
🔧 How to replicate this setup
This is a live case study: here's how you can customize the environment for your own lab or classroom.
📦 Client-side storage
Auto-saves to localStorage. No backend needed — works on any static host.
JSON.parse(localStorage.getItem("mt_sessions")||"[]")� Sheet ID
Change SHEET_ID in trainer.js and tanalytics.js. This identifies which Sheet to use.
const SHEET_ID="your-sheet-id";🌐 Two ways to connect your Sheet
Choose based on whether your Sheet is public or private. Both work — the dashboard auto-detects which method succeeds.
� Path A: Public Sheet (gviz)
Easiest. Set Sheet sharing to "Anyone with link can view". The dashboard reads directly via gviz API — no Apps Script needed for reading.
For writing sessions, you still need an Apps Script endpoint deployed from Extensions → Apps Script.
GVIZ_URL = gviz/tq?tqx=out:json&gid=YOUR_GID
After exam: change to "can comment" to prevent new entries while keeping data visible.
🔵 Path B: Private Sheet (Apps Script)
More private. Sheet stays restricted. Deploy an Apps Script web app that reads and returns JSON. The dashboard fetches from the script instead.
Same Apps Script handles both reading and writing — one endpoint does it all.
APPS_SCRIPT = "https://script.google.com/.../exec"
After exam: disable the web app or restrict access in Apps Script settings.
🔗 Current endpoints
Sheet: 1GcgjCJEPDAFtqOwONsfN_np5zdZFe3v2qa2lNzqDZd4 (public, comment access)
gviz (reading): gviz/tq?tqx=out:json&gid=1089917585
Apps Script (writing + fallback): AKfycbzDJy4ysMJpXiDXI1_nwZYP1BCx0S1bZ7y9NHmDiD6wPhgfyRb4oXwDRO4twW2NfwNr1A
Auto-detect: gviz first → Apps Script fallback → localStorage