{"slug": "rivalry-radar-world-cup-passion-engine-with-snowflake-google-ai", "title": "Rivalry-Radar-World-Cup-passion-engine-with-Snowflake-Google-AI", "summary": "A developer built Rivalry Radar, a live 'Heat Index' for World Cup rivalries that uses Google AI (Gemini) to score sentiment of fan takes and Snowflake to compute and rank the heat index in real time. The app features two leaderboards showing the hottest rivalries and most passionate fanbases, with a self-contained frontend that animates digit-by-digit updates like an airport departure board.", "body_md": "This is a submission for Weekend Challenge: Passion Edition\n\n*( https://dev.to/challenges/weekend-2026-07-09)*\n\nRivalry Radar — a live \"Heat Index\" for World Cup rivalries. Fans drop 280-character Terrace Takes on any matchup (Brazil vs Argentina, England vs France, whatever's got you shouting at the TV), rate how much the moment hurt or thrilled them from 1–10, and the app does the rest:\n\nGoogle AI (Gemini) scores every take's sentiment the instant it lands — positive, negative, mixed, or neutral — and separately writes a short \"Hype Verdict\" in the voice of a stadium announcer, based on the latest takes for a matchup.\n\nThat sentiment score feeds a Heat Index, computed and ranked in Snowflake with RANK() OVER (ORDER BY heat_index DESC), combining take volume, sentiment intensity, and self-rated passion into one live number per rivalry.\n\nTwo leaderboards: which rivalry is hottest right now, and which fanbase is bringing the most passion overall.\n\nfrontend/index.html is fully self-contained: opening it in a browser lets\n\nanyone submit takes, watch the Heat Index flip digit-by-digit like an\n\nairport departure board, and see the leaderboards re-rank in real time. It\n\nships with seed takes from eight classic rivalries so it's not empty on\n\nfirst load.\n\nFans drop 280-character **Terrace Takes** on any World Cup matchup. **Google AI\n(Gemini)** scores the emotion behind every word and writes a stadium-announcer\n**Hype Verdict**; **Snowflake** stores every take and computes a live **Heat\nIndex** that ranks exactly which rivalry is boiling hottest right now.\n\nBuilt for the DEV\n\nWeekend Challenge: Passion Edition🏆 Best Use of Google AI and Best Use of Snowflake\n\nPassion is easy to feel and hard to measure. Every World Cup rivalry generates an ocean of unstructured text — chants, rants, one-line hot takes — that traditionally just... disappears into group chats. Rivalry Radar treats that text as data: Gemini reads the emotion in it the moment it's written, and Snowflake turns that into a live, rankable leaderboard.\n\n| Does what | |\n|---|---|\nGoogle AI (Gemini) |\nScores each take's sentiment (positive/negative/mixed/neutral) |\n\nThe build started from the Heat Index formula, since that's the number the\n\nwhole app orbits around: avg_passion * 0.5 + avg_sentiment_intensity * 3 + log2(take_count + 1) * 2. Volume matters (a rivalry with one take isn't\n\n\"hot\"), but so does how emotionally loaded the language is — and that's\n\nwhere Google AI comes in.\n\nGemini reads each take and classifies its sentiment:\n\n```\nprompt = (\n    \"Classify the overall emotional sentiment of this football fan \"\n    \"comment as exactly one word — positive, negative, mixed, or \"\n    f\"neutral. Reply with only that one word.\\n\\nComment: {text}\"\n)\nresponse = client.models.generate_content(model=\"gemini-2.5-flash\", contents=prompt)\n```\n\nThat categorical result gets mapped to a numeric intensity — fury counts\n\nexactly as much as joy, both are passion — so it drops straight into the\n\nHeat Index math.\n\nFor the fun part, Gemini also turns the most recent takes for a rivalry into\n\na punchy one-liner:\n\n```\nprompt = (\n    \"You are a stadium hype announcer. In under 40 words, deliver a \"\n    f\"punchy verdict on the {team_a_name} vs {team_b_name} World Cup \"\n    f\"rivalry based on these fan takes: {joined}\"\n)\n```\n\nSnowflake handles the other half of the job: storing every take and\n\ncomputing the leaderboards with real SQL — aggregation, a derived metric,\n\nand a RANK() window function per rivalry and per fanbase. It's a clean\n\nsplit: Gemini reads the emotion, Snowflake turns it into a ranking.\n\nThe backend is a small FastAPI service with two independent fallbacks,\n\nkeeping the whole flow explorable without handing out API keys for a\n\nweekend project: no GEMINI_API_KEY → sentiment scoring falls back to a\n\nkeyword heuristic; no SNOWFLAKE_ACCOUNT → the whole API runs in demo mode\n\nwith seed data.\n\nThe frontend leaned into the subject: a split-flap \"departure board\" digit\n\nanimation for the Heat Index, a scrolling terrace-chant ticker, and a\n\nsubmission form styled like a stadium chalkboard — an attempt to make the\n\ndata feel like the thing it's measuring.\n\n*Submitting for Best Use of Google AI and Best Use of Snowflake* — Gemini does the real intelligence work in this project: reading the emotion behind every fan take and writing the Hype Verdict. Snowflake plays an honest supporting role as the data warehouse, storing every take and doing the ranking analytics that turn Gemini's scores into a live leaderboard.\n\nThank you.", "url": "https://wpnews.pro/news/rivalry-radar-world-cup-passion-engine-with-snowflake-google-ai", "canonical_source": "https://dev.to/nandhutee/rivalry-radar-world-cup-passion-engine-with-snowflake-google-ai-12im", "published_at": "2026-07-13 03:54:23+00:00", "updated_at": "2026-07-13 04:15:24.817094+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-products", "ai-tools", "developer-tools"], "entities": ["Google AI", "Gemini", "Snowflake", "DEV", "FastAPI"], "alternates": {"html": "https://wpnews.pro/news/rivalry-radar-world-cup-passion-engine-with-snowflake-google-ai", "markdown": "https://wpnews.pro/news/rivalry-radar-world-cup-passion-engine-with-snowflake-google-ai.md", "text": "https://wpnews.pro/news/rivalry-radar-world-cup-passion-engine-with-snowflake-google-ai.txt", "jsonld": "https://wpnews.pro/news/rivalry-radar-world-cup-passion-engine-with-snowflake-google-ai.jsonld"}}