🌍 WorldPulseAI – The Global Sentiment App

🚀 Inspiration

Every day, the world’s most critical headlines flood our screens, yet the collective, global feeling on issues like war, education, or climate remains scattered and elusive. Data is fragmented across languages, newsrooms, and reports. WorldPulseAI was born from a simple question:

“Why can’t I see the planet’s collective emotional and analytical mood in one glance?”

Inspired by the idea of giving the world a literal, measurable heartbeat, WorldPulseAI uses cutting-edge AI to instantly measure and visualize global sentiment, transforming overwhelming complexity into immediate clarity.


💡 What It Does

WorldPulseAI is a global sentiment intelligence platform powered by Google Gemini and a high-performance FastAPI backend. It provides real-time emotional and analytical trends across 100+ countries, mapping them directly onto a stunning, interactive 3D Earth visualization.

Core User Journey

Topic Analysis Users enter any critical topic (e.g., education, climate change, inflation).

Global Visualization The interactive 3D globe updates live, coloring each country based on its synthesized sentiment score:

  • 🟢 Stable / Improving (Score ≥ 0.5) – Strong positive momentum
  • 🟡 Mixed / Uncertain (0.0 – 0.5) – Requires monitoring
  • 🟠 High Concern (–0.5 – 0.0) – Immediate attention warranted
  • 🔴 Crisis (< –0.5) – Critical situation

Deep Dive Insight Clicking any country instantly reveals:

  • A concise, Gemini-generated national summary
  • A precise numeric sentiment score
  • Three distilled, actionable keywords

Policy Tracking Users can bookmark topics and compare countries side-by-side for high-level policy and trend analysis.


🧠 How We Built It

Tech Stack Overview

  • 🧩 Backend: FastAPI (Python), deployed on Google Cloud Run for scalable, asynchronous processing
  • ⚙️ AI Engine: Gemini 2.5 Flash via Vertex AI REST API, enforcing strict JSON schema output
  • 🌐 Frontend: Vanilla JavaScript + Globe.GL (Three.js) for high-performance real-time 3D visualization
  • 📊 Data Flow: Asynchronous batch sentiment processing across 100 countries
  • 💾 Storage: In-memory JSON mapping + browser localStorage for history and bookmarks

🔁 High-Throughput Workflow

  1. A single user query triggers one backend API call.
  2. FastAPI fans out 100 concurrent, country-specific Gemini requests, each acting as an analytical agent.
  3. Each Gemini call returns strictly structured JSON:
{
  "country": "Finland",
  "topic": "education",
  "sentiment_score": 0.85,
  "summary": "Globally recognized for equity and quality teachers.",
  "keywords": ["equity", "teachers", "student-centered"]
}
  1. Results stream back progressively, allowing the 3D globe to light up country-by-country in real time, rather than blocking the user.

🎨 Visual Extension with Bria FIBO

To extend analytical insights into visual expression, WorldPulseAI explores Bria’s FIBO structured prompting approach as a downstream visualization layer.

Structured sentiment outputs (topic, country, keywords) are translated into controlled, professional visual prompts, enabling AI-generated imagery that reflects national mood or thematic context (e.g., climate stress, stability, recovery).

⚠️ Current FIBO Limitations

While FIBO offers powerful controllable visual generation, we encountered practical constraints during integration:

  • Hardware & resource constraints make local FIBO inference difficult in lightweight cloud environments.
  • FIBO image generation is computationally heavy and not yet optimized for high-throughput, real-time global batch rendering.
  • As a result, FIBO is currently positioned as a selective, on-demand visual layer rather than a per-country real-time generator.

Despite these limitations, the project demonstrates how structured JSON intelligence can seamlessly feed into controllable visual generation pipelines, laying the groundwork for deeper future integration.


⚡ Challenges We Ran Into

1. Name Mismatch between AI and GeoJSON

Problem: Formal map identifiers conflicted with Gemini’s natural naming. Solution: A robust frontend normalization dictionary ensured perfect alignment.

2. Dynamic Data Loading & Responsiveness

Problem: Blocking global inference caused long wait times. Solution: Progressive rendering allowed live globe updates as results arrived.

3. Latency in Gemini Calls

Problem: High concurrency stressed response times. Solution: Controlled concurrency using ThreadPoolExecutor + asyncio.Semaphore (8 parallel calls).

4. Visual Generation Constraints (FIBO)

Problem: Local inference required heavy dependencies and storage. Solution: Scoped FIBO usage to controlled, illustrative visuals while keeping Gemini as the analytical core.


🏆 Accomplishments We’re Proud Of

  • Scalable AI Concurrency: Orchestrating 100+ country-level AI agents reliably
  • Real-Time Visualization: Progressive globe updates create a cinematic, living system
  • JSON-Native Architecture: Entire system runs on schema-validated AI outputs
  • Professional UX: Clear visual language that instantly communicates global sentiment

🧩 What We Learned

  • The power of strict JSON schema enforcement for controllable AI systems
  • Advanced FastAPI concurrency patterns for AI workloads
  • The importance of geospatial normalization in real-world data systems
  • How structured intelligence can drive visual storytelling, even across different AI models

🌐 What’s Next for WorldPulseAI

  • Expand coverage to all 195 UN-recognized countries
  • Add time-series sentiment graphs and trend analysis
  • Enhance drill-down analytics with sources and regional context
  • Explore predictive forecasting for sentiment shifts
  • Deeper, optimized integration of structured visual generation (FIBO-style pipelines)

WorldPulseAI is more than an app. It’s the world’s heartbeat - measured, structured, and visualized. 🌍💫

Built With

Share this project:

Updates