The big-move model (Spark MLlib) and the live dashboard
docs/architecture/11-ml-and-dashboard.mmd
Guide
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Calendar Effects","description":"A guided tour of the Calendar Effects codebase: Kafka, Spark Structured Streaming, an event study and a Spark MLlib model, read from start to finish.","colors":{"primary":"#2a78d6","light":"#3987e5","dark":"#1c5cab"},"contextual":{"options":["copy","view","claude","chatgpt","cursor","mcp"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"calendar-effects","hasAudioNarration":false,"actualSubdomain":"calendar-effects","customDomains":[],"gitSource":{"type":"github","owner":"calendar-effects","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b06136e922004b9d4635d22"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b0811eff3da7f068e3eb774","clientVersion":"0.0.4336","searchFilterCounts":[{"language":"default","tag":"Code","count":85},{"language":"default","tag":"Data and decisions","count":30},{"language":"default","tag":"10. Tests and team tooling","count":29},{"language":"default","tag":"9. The dashboard and publishing","count":17},{"language":"default","tag":"Decisions","count":15},{"language":"default","tag":"Project log","count":15},{"language":"default","tag":"Guide","count":14},{"language":"default","tag":"Diagrams","count":14},{"language":"default","tag":"Handoffs, newest first","count":10},{"language":"default","tag":"The tour","count":10}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"diagrams/11-ml-and-dashboard","slug":"/diagrams/11-ml-and-dashboard","pageMetadata":{"title":"The big-move model (Spark MLlib) and the live dashboard","description":"docs/architecture/11-ml-and-dashboard.mmd","href":"/diagrams/11-ml-and-dashboard"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"docs/architecture/11-ml-and-dashboard.mmd\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const{Heading,Mermaid}={..._provideComponents(),...props.components};if(!Heading)_missingMdxReference(`Heading`,true);if(!Mermaid)_missingMdxReference(`Mermaid`,true);return _jsxs(_Fragment,{children:[_jsx(Mermaid,{chart:`%% Calendar Effects · 11 · The big-move model (Spark MLlib) and the live dashboard · Mahad · decisions 0007, 0008.\n%% Paste into Miro: Creation bar > Diagram > Build with code.\nflowchart LR\n signals[(\"data/stream/signals\u003cbr/>the stream's daily rows\u003cbr/>95,190 stock-days\")]\n\n subgraph FEAT[\"src/ml/features.py · the same features for training and live\"]\n f1[\"today's row\u003cbr/>|z_ar| · ar_sd · beta · |mkt_ret|\u003cbr/>z_views · spike · log vol_ratio\"]\n f2[\"calendar\u003cbr/>days to / since an event\u003cbr/>day of week · month\"]\n f3[\"config/retailers.csv\u003cbr/>is_online\"]\n end\n\n subgraph TRAIN[\"src/ml/train.py · Spark MLlib Pipelines\"]\n split[\"TIME SPLIT, purged\u003cbr/>train 2016–2022 · choose on 2023\u003cbr/>test 2024–2025\"]\n cands[\"CANDIDATES\u003cbr/>logistic regression (scaled)\u003cbr/>gradient-boosted trees\u003cbr/>classes weighted equally\"]\n pick[\"PICK on 2023 by PR-AUC\u003cbr/>→ trees, depth 3\u003cbr/>refit on 2016–2023\"]\n test{\"TEST 2024–2025\u003cbr/>ROC-AUC 0.69 · PR-AUC 0.135\u003cbr/>top 5% hit 21.5% vs 5.2% base\u003cbr/>baseline |z_ar|: 0.58\"}\n end\n\n model[(\"data/models/big_move\u003cbr/>PipelineModel + alert cut-off\")]\n results[(\"data/results/\u003cbr/>ml_metrics · ml_test_predictions\u003cbr/>ml_feature_importance · ml charts\")]\n\n subgraph LIVE[\"src/streaming/job.py · each micro-batch\"]\n score[\"score today's rows\u003cbr/>inside the JVM\u003cbr/>no Python on workers\"]\n preds[(\"data/stream/predictions\u003cbr/>p_big_move_next\u003cbr/>big_move_alert = top 5%\")]\n end\n\n subgraph DASH[\"src/dashboard/app.py · on a laptop and hosted · diagram 12\"]\n d1[\"reads finished batches only\u003cbr/>_SUCCESS marker · refreshes every 5 s\"]\n d2[\"today's alerts · tomorrow's watchlist\u003cbr/>event CARs as windows close\u003cbr/>alerts per day · one retailer's path\"]\n d3[\"views: Live stream · Replay any years\u003cbr/>Event history \u0026 forecast · About\"]\n end\n\n signals --> FEAT --> split --> cands --> pick --> test\n pick --> model\n test --> results\n model --> score --> preds\n signals --> d1\n preds --> d1\n d1 --> d2 --> d3`}),`\n`,_jsx(Heading,{level:`2`,id:`guide`,children:`Guide`}),`\n`,_jsx(Mermaid,{chart:`%% Calendar Effects · Guide 11 · The big-move model and the live dashboard · goes next to diagram 11-ml-and-dashboard.mmd\n%% Miro: paste onto a board, or Creation bar > Diagram > Build with code. Read top to bottom.\nflowchart TB\n T[\"GUIDE 11 · THE BIG-MOVE MODEL AND THE DASHBOARD\u003cbr/>src/ml/ · src/dashboard/ · decisions 0007, 0008\"]\n\n subgraph S1[\"1 · THE QUESTION\"]\n direction TB\n q1[\"WILL TOMORROW BE A BIG MOVE?\u003cbr/>for each retailer, from what\u003cbr/>the stream knows today\"]\n q2[\"BIG MOVE\u003cbr/>tomorrow's |z_ar| ≥ 1.96\u003cbr/>= tomorrow's daily alert\"]\n q3[\"WHY NOT DIRECTION?\u003cbr/>up or down is close to a coin toss\u003cbr/>a big move either way is predictable\"]\n end\n\n subgraph S2[\"2 · WORDS\"]\n direction TB\n w1[\"MLlib\u003cbr/>Spark's machine-learning library\u003cbr/>runs on the cluster\"]\n w2[\"PIPELINE\u003cbr/>assemble features → scale → model\u003cbr/>saved and loaded as one object\"]\n w3[\"GRADIENT-BOOSTED TREES\u003cbr/>many small decision trees,\u003cbr/>each fixing the last one's errors\"]\n w4[\"ROC-AUC\u003cbr/>chance a big-move day ranks above\u003cbr/>a quiet day · 0.5 = chance\"]\n w5[\"PR-AUC\u003cbr/>precision across recall levels\u003cbr/>compare with the base rate\"]\n end\n\n subgraph S3[\"3 · DOING IT HONESTLY\"]\n direction TB\n h1[\"TIME SPLIT\u003cbr/>never random rows: the model\u003cbr/>is tested on later days only\"]\n h2[\"PURGED\u003cbr/>a row whose tomorrow falls\u003cbr/>in the next period is dropped\"]\n h3[\"CLASS WEIGHTS\u003cbr/>big moves are 5% of days\u003cbr/>so each class counts equally\"]\n h4[\"SAME FEATURES LIVE\u003cbr/>one function for training\u003cbr/>and for scoring\"]\n end\n\n subgraph S4[\"4 · RESULTS · test years 2024–2025 · 18,696 stock-days\"]\n direction TB\n r1[\"TREES · ROC-AUC 0.69\u003cbr/>top 5% flagged: 21.5% are big moves\u003cbr/>4.1× the 5.2% base rate\"]\n r2[\"BASELINE · today's |z_ar|\u003cbr/>ROC-AUC 0.58 · 2.4× lift\"]\n r3[\"WITHOUT ATTENTION\u003cbr/>same score: Wikipedia adds\u003cbr/>nothing to this model\"]\n r4[\"WHAT MATTERS\u003cbr/>month · volume · market move\u003cbr/>volatility · days to an event\"]\n end\n\n subgraph S5[\"5 · THE DASHBOARD\"]\n direction TB\n d1[\"streamlit run\u003cbr/>src/dashboard/app.py\u003cbr/>→ localhost:8501\"]\n d2[\"READS SAFELY\u003cbr/>only batches with _SUCCESS\u003cbr/>each batch cached once\"]\n d3[\"SHOWS\u003cbr/>today's alerts · watchlist\u003cbr/>closing event CARs · charts\"]\n d4[\"FOR THE DEMO\u003cbr/>job without --once replays\u003cbr/>one file every 5 seconds\"]\n end\n\n subgraph S6[\"6 · SAY IT CAREFULLY\"]\n direction TB\n c1[\"0.69 IS A RANKING EDGE\u003cbr/>not a trading strategy\"]\n c2[\"CLUSTER\u003cbr/>a Spark 4 model may not load in 3.5\u003cbr/>retrain there with spark-submit\"]\n end\n\n T --> S1 --> S2 --> S3 --> S4 --> S5 --> S6\n\n classDef head fill:#2C2C2A,stroke:#2C2C2A,color:#FFFFFF\n classDef idea fill:#E6F1FB,stroke:#185FA5,color:#0C447C\n classDef step fill:#E1F5EE,stroke:#0F6E56,color:#085041\n classDef win fill:#EAF3DE,stroke:#3B6D11,color:#27500A\n classDef warn fill:#FAECE7,stroke:#993C1D,color:#712B13\n classDef ask fill:#EEEDFE,stroke:#534AB7,color:#3C3489\n class T head\n class q1,q2,q3 ask\n class w1,w2,w3,w4,w5 idea\n class h1,h2,h3,h4 step\n class r1,r2,r4 win\n class r3 warn\n class d1,d2,d3,d4 step\n class c1,c2 warn\n style S1 fill:#FFFFFF,stroke:#B4B2A9\n style S2 fill:#FFFFFF,stroke:#B4B2A9\n style S3 fill:#FFFFFF,stroke:#B4B2A9\n style S4 fill:#FFFFFF,stroke:#B4B2A9\n style S5 fill:#FFFFFF,stroke:#B4B2A9\n style S6 fill:#FFFFFF,stroke:#B4B2A9`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"The big-move model (Spark MLlib) and the live dashboard","description":"docs/architecture/11-ml-and-dashboard.mmd","href":"/diagrams/11-ml-and-dashboard"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Guide","slug":"guide","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"calendar-effects","siteName":"Calendar Effects","title":"The big-move model (Spark MLlib) and the live dashboard - Calendar Effects","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-26T10:43:57.061Z","originalFileLocation":"diagrams/11-ml-and-dashboard.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"docs/architecture/11-ml-and-dashboard.mmd\">\u003cmeta data-mint-head name=\"application-name\" content=\"Calendar Effects\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/calendar-effects/_generated/favicon/apple-touch-icon.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/calendar-effects/_generated/favicon/favicon-32x32.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/calendar-effects/_generated/favicon/favicon-16x16.png?v=3\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/calendar-effects/_generated/favicon/favicon.ico?v=3\">\u003cmeta data-mint-head property=\"og:title\" content=\"The big-move model (Spark MLlib) and the live dashboard - Calendar Effects\">\u003cmeta data-mint-head property=\"og:description\" content=\"docs/architecture/11-ml-and-dashboard.mmd\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Calendar Effects\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://calendar-effects.mintlify.app/diagrams/11-ml-and-dashboard\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://calendar-effects.mintlify.site/_mintlify/api/og/v2?division=Diagrams\u0026amp;title=The+big-move+model+%28Spark+MLlib%29+and+the+live+dashboard\u0026amp;description=docs%2Farchitecture%2F11-ml-and-dashboard.mmd\u0026amp;theme=29db6fd47804fbbe6e0556aa\u0026amp;signature=ecaf46108c2b02ade4167fd44c710501ccd02dfa1d469f526e61eb3b725efe53\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"The big-move model (Spark MLlib) and the live dashboard - Calendar Effects\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"docs/architecture/11-ml-and-dashboard.mmd\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://calendar-effects.mintlify.site/_mintlify/api/og/v2?division=Diagrams\u0026amp;title=The+big-move+model+%28Spark+MLlib%29+and+the+live+dashboard\u0026amp;description=docs%2Farchitecture%2F11-ml-and-dashboard.mmd\u0026amp;theme=29db6fd47804fbbe6e0556aa\u0026amp;signature=ecaf46108c2b02ade4167fd44c710501ccd02dfa1d469f526e61eb3b725efe53\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/calendar-effects/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Calendar Effects\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2a78d6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://calendar-effects.mintlify.app/diagrams/11-ml-and-dashboard\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/diagrams/11-ml-and-dashboard.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://calendar-effects.mintlify.app/#organization\",\"name\":\"Calendar Effects\",\"url\":\"https://calendar-effects.mintlify.app\"},{\"@type\":\"WebSite\",\"@id\":\"https://calendar-effects.mintlify.app#website\",\"name\":\"Calendar Effects\",\"url\":\"https://calendar-effects.mintlify.app\",\"publisher\":{\"@id\":\"https://calendar-effects.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://calendar-effects.mintlify.app/diagrams/11-ml-and-dashboard#webpage\",\"url\":\"https://calendar-effects.mintlify.app/diagrams/11-ml-and-dashboard\",\"name\":\"The big-move model (Spark MLlib) and the live dashboard\",\"description\":\"docs/architecture/11-ml-and-dashboard.mmd\",\"dateModified\":\"2026-11-26T10:43:57.061Z\",\"isPartOf\":{\"@id\":\"https://calendar-effects.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://calendar-effects.mintlify.app/diagrams/11-ml-and-dashboard#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://calendar-effects.mintlify.app/diagrams/11-ml-and-dashboard#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Diagrams\",\"item\":\"https://calendar-effects.mintlify.app/diagrams/01-big-picture\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The big-move model (Spark MLlib) and the live dashboard\",\"item\":\"https://calendar-effects.mintlify.app/diagrams/11-ml-and-dashboard\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://calendar-effects.mintlify.app/diagrams/11-ml-and-dashboard#article\",\"headline\":\"The big-move model (Spark MLlib) and the live dashboard\",\"name\":\"The big-move model (Spark MLlib) and the live dashboard\",\"description\":\"docs/architecture/11-ml-and-dashboard.mmd\",\"url\":\"https://calendar-effects.mintlify.app/diagrams/11-ml-and-dashboard\",\"mainEntityOfPage\":{\"@id\":\"https://calendar-effects.mintlify.app/diagrams/11-ml-and-dashboard#webpage\"},\"dateModified\":\"2026-11-26T10:43:57.061Z\",\"publisher\":{\"@id\":\"https://calendar-effects.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://calendar-effects.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Calendar Effects\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Calendar Effects\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/diagrams/11-ml-and-dashboard.md","siteName":"Calendar Effects","nav":{"global":null,"tabs":[{"tab":"Guide","pages":[{"title":"Guide","href":""}]},{"tab":"Code","pages":[{"title":"Code","href":"/reference/README-md"}]},{"tab":"Data and decisions","groups":[{"group":"Data","pages":[{"title":"Data contracts","href":"/contracts"}]},{"group":"Decisions","pages":[{"title":"0001. The repo is the shared memory for everyone's AI assistant","href":"/decisions/0001-shared-repo-context-for-ai-assistants"},{"title":"0002. Project name: Calendar Effects","href":"/decisions/0002-project-name-calendar-effects"},{"title":"0003. An expandable event calendar","href":"/decisions/0003-expandable-event-calendar"},{"title":"0004. Streaming job design and shared study settings","href":"/decisions/0004-streaming-job-design"},{"title":"0005. Everything that defines the study is read from config/ and common/","href":"/decisions/0005-config-driven-pipeline"},{"title":"0006. Batch event study outputs and tests","href":"/decisions/0006-batch-event-study-outputs"},{"title":"0007. A Spark MLlib model that predicts tomorrow's big moves, scored live","href":"/decisions/0007-big-move-model"},{"title":"0008. A Streamlit dashboard that shows the streaming job's alerts live","href":"/decisions/0008-live-alerts-dashboard"},{"title":"0009. Study 38 retailers instead of 10","href":"/decisions/0009-larger-retailer-universe"},{"title":"0010. Publish the results, the model and a public dashboard on Hugging Face","href":"/decisions/0010-publish-on-hugging-face"},{"title":"0011. A docs site (Mintlify) that is rebuilt from the code and checked on every commit","href":"/decisions/0011-docs-site-in-step-with-the-code"},{"title":"0012. Scope: Wikipedia is the attention measure; GDELT and retail sales are not analysed","href":"/decisions/0012-scope-gdelt-and-retail-sales"},{"title":"0013. One Streamlit dashboard, on a laptop and hosted, with a live feed","href":"/decisions/0013-one-hosted-streamlit-dashboard"},{"title":"0014. Team organisations, a committed results pack, and credit for every member","href":"/decisions/0014-team-homes-results-and-credit"},{"title":"0015. The live stream runs on GitHub Actions","href":"/decisions/0015-cloud-streamer-on-github-actions"}]},{"group":"Diagrams","pages":[{"title":"The big picture","href":"/diagrams/01-big-picture"},{"title":"What is studied, and the rules every script follows","href":"/diagrams/02-config-and-shared-rules"},{"title":"ETL: Extract (download), Transform (clean), Load (save)","href":"/diagrams/03-etl"},{"title":"Replaying ten years as if they were happening live","href":"/diagrams/04-kafka-replay"},{"title":"Inside the streaming job (src/streaming/job.py + signals.py)","href":"/diagrams/05-streaming-job"},{"title":"The batch event study (src/eventstudy/)","href":"/diagrams/06-batch-event-study"},{"title":"How we know the numbers are right, and what stops mistakes","href":"/diagrams/07-checks-and-guardrails"},{"title":"How to run it: on a laptop, or on the SFU cluster","href":"/diagrams/08-running-it"},{"title":"Code map: where every idea lives","href":"/diagrams/09-code-map"},{"title":"Study plan, and the questions you should be able to answer","href":"/diagrams/09a-study-plan-and-qa-guide"},{"title":"Design choices, limitations, and ideas to improve it","href":"/diagrams/09b-choices-limits-ideas-guide"},{"title":"Glossary","description":"docs/architecture/10-glossary.mmd","href":"/diagrams/10-glossary"},{"title":"The big-move model (Spark MLlib) and the live dashboard","href":"/diagrams/11-ml-and-dashboard"},{"title":"Hosting, publishing and the live demo","description":"docs/architecture/12-hosting-and-live-demo.mmd","href":"/diagrams/12-hosting-and-live-demo"}]}]},{"tab":"Project log","pages":[{"title":"Project log","href":"/log/status"}]}]},"basePath":"","title":"The big-move model (Spark MLlib) and the live dashboard - Calendar Effects","deploymentId":"dpl_9bQLTw9nc2h9csDGYcKwWenPcQWn","buildId":"dpl_9bQLTw9nc2h9csDGYcKwWenPcQWn","dynamics":[],"chunks":[]}