Skip to content

Latest commit

 

History

History
213 lines (159 loc) · 5.27 KB

File metadata and controls

213 lines (159 loc) · 5.27 KB

🚀 UNGA Analysis Platform - Quick Start Guide

📊 Platform Overview

UN General Assembly Speech Analysis Platform

  • 11,094 speeches from 1946-2025 (80 years)
  • 200 countries with auto-classification
  • AI-powered analysis with Azure OpenAI
  • Advanced visualizations with SDG tracking

⚡ Quick Start

1. Start the Application

cd /Users/mafilicious/Projects/osaa-unga-80
source unga80/bin/activate
streamlit run main.py

Access at: http://localhost:8501

2. Best Features to Demo

For Presentations:

  • See ULTIMATE_DEMO_GUIDE.md for complete presentation flow

Quick Wins:

  1. SDG Analysis → Compare SDG 13 (Climate) across Africa/Asia/Europe
  2. Keyword Trends → Track "artificial intelligence" across US/China/Kenya
  3. New Analysis → Analyze Kenya 2024 speech
  4. Cross-Year → Bangladesh gender equality evolution

🎯 Core Features

Analysis Capabilities:

  • ✅ Single speech AI analysis (30 seconds)
  • ✅ Cross-year quantitative analysis
  • ✅ Multi-entity keyword comparison
  • ✅ SDG discourse tracking (all 17 goals)
  • ✅ Topic salience over time
  • ✅ Country similarity detection

Visualization Modes:

  • ✅ Issue Salience & Topics
  • ✅ Country Positions & Similarity
  • ✅ Trends & Trajectories (keyword comparison)
  • SDG Analysis (with official UN colors)
  • ✅ Networks & Relationships
  • ✅ Classic Charts (alternative mode)

Data Coverage:

  • 🌍 200 countries
  • 📅 1946-2025 (80 years)
  • 🏛️ 11,094 speeches
  • 🌍 7 regions (97% coverage)
  • 🇺🇳 54 African nations auto-classified

🎯 Recommended Demo Config

Config: Climate Action SDG Across Regions

Location: Visualizations → Advanced Analytics → SDG Analysis

SDGs: SDG 13: Climate Action
Year Range: 2010-2025
Compare: Regions
Regions: Africa, Asia, Europe

Result: 3-line chart in official UN colors
        Shows regional climate discourse evolution
        Clear 2015 SDG adoption impact

Why This Config:

  • Most visually impressive
  • Policy-relevant
  • Official UN branding
  • Clear trends
  • 2,851 speeches analyzed

📁 Important Files

Essential Documentation:

  • ULTIMATE_DEMO_GUIDE.md - Complete presentation guide with all configs
  • README.md - Main project documentation
  • env.template - Environment configuration template

Keep These:

  • requirements.txt - Python dependencies
  • main.py - Application entry point
  • .env - Your environment variables (not in git)

Cleaned Up:

  • ❌ Removed duplicate presentation guides
  • ❌ Removed test files from root
  • ❌ Removed outdated summaries

🔧 Configuration

Environment Variables (in .env):

# Azure OpenAI - Primary
AZURE_OPENAI_ENDPOINT=https://your-resource-name.cognitiveservices.azure.com/
AZURE_OPENAI_API_KEY=your-key
AZURE_OPENAI_API_VERSION=2024-12-01-preview
AZURE_OPENAI_DEPLOYMENT_NAME=model-router

# Available Models:
# - model-router (default, fastest)
# - gpt-4o-unga
# - gpt-5-unga

Database:

  • unga_vector.db - Main database (1.2 GB)
  • DuckDB format with vector embeddings
  • Auto-created on first run

✅ Verification Checklist

Before presenting:

  • App starts without errors
  • Can see "11,094 speeches" in header
  • Visualizations tab loads
  • SDG Analysis tab visible
  • Can generate chart with Africa region
  • Can analyze a single speech (Kenya 2024)
  • Cross-year analysis works
  • All 195 countries in dropdown

🎊 What's Working

All Core Features:

  • ✅ Authentication (bypassed for testing)
  • ✅ Country selection (195 countries, searchable)
  • ✅ Auto-classification (African vs Development Partner)
  • ✅ File upload (PDF, DOCX, MP3, TXT)
  • ✅ Text extraction and translation
  • ✅ Database storage (speeches + analyses)
  • ✅ AI analysis with rich markdown
  • ✅ Enhanced prompts (tables, charts, quotes)
  • ✅ Suggestion questions (30 per analysis)
  • ✅ Chat interface (follow-up questions)
  • ✅ Download speeches as .txt
  • ✅ Save all analyses to database
  • ✅ Advanced visualizations
  • ✅ SDG tracking (17 goals, UN colors)
  • ✅ Multi-entity comparison
  • ✅ Region filtering (country-name based)

Azure Integration:

  • ✅ 3 deployments found and configured
  • ✅ API calls working (model-router)
  • ✅ Rate limits adjusted (100/min)
  • ✅ Error handling with retries

Database:

  • ✅ 11,094 speeches loaded
  • ✅ 10,759 speeches with regions (97%)
  • ✅ Workaround for region display (country-name mapping)
  • ✅ All analyses saved and retrievable

🆘 Troubleshooting

Visualizations Show "0 speeches":

  • Refresh browser (F5)
  • Try without region filter first
  • Check ULTIMATE_DEMO_GUIDE.md for working configs

Import Errors:

  • Restart app completely (Ctrl+C, then restart)
  • Check virtual environment is activated

No Results in Analysis:

  • Verify country selected from dropdown
  • Ensure date is valid
  • Check internet connection for API calls

📚 For More Information

  • Full Demo Guide: ULTIMATE_DEMO_GUIDE.md
  • Main Documentation: README.md
  • API Docs: docs/API.md
  • Deployment: docs/DEPLOYMENT.md

Platform is production-ready! 🎉

Built for UN OSAA | Powered by Azure OpenAI | 1946-2025 Coverage