Skip to main content

Overview

SENTi-radar’s sentiment analysis engine continuously monitors trending topics across X (Twitter) and YouTube, providing real-time insights into public opinion. The platform analyzes thousands of posts, comments, and discussions to deliver actionable sentiment intelligence.

How It Works

1

Topic Selection

Select a trending topic from the dashboard or create a custom topic to monitor. Each topic includes a hashtag identifier for social media tracking.
2

Data Collection

The system fetches real-time data from multiple sources:
  • YouTube: Video titles, descriptions, and top comments via YouTube Data API v3
  • Google News: Headlines via RSS feeds
  • X & Reddit: Posts and discussions via Scrape.do integration
  • Analyzes 25-100+ texts per topic
3

Sentiment Calculation

AI models process the collected text to determine:
  • Overall sentiment (Positive, Negative, or Mixed)
  • Sentiment score (-100 to +100)
  • Volume trends and percentage changes
  • Volatility metrics
4

Live Visualization

Results appear instantly in the Topic Detail panel with interactive charts and real-time updates.

Sentiment Gauge

The sentiment gauge provides an at-a-glance view of overall public opinion:
// Source: SentimentGauge.tsx
const score = Math.round(((positive - negative) / total) * 100);

const label = score > 20 ? 'Positive' 
            : score < -20 ? 'Negative' 
            : 'Neutral';
The gauge needle moves dynamically from -100 (extremely negative) to +100 (extremely positive), with neutral sentiment centered at 0.

Interpreting Scores

  • +20 to +100: Positive sentiment dominates
  • -20 to +20: Mixed or neutral sentiment
  • -100 to -20: Negative sentiment dominates

Data Sources

YouTube Integration

Fetches video search results and top comments using the YouTube Data API v3. Analyzes both video metadata and user-generated comments.

Google News RSS

Monitors news headlines from Google News RSS feeds to capture media narratives and breaking developments.

X (Twitter) via Scrape.do

Collects real-time posts and discussions from X using the Scrape.do proxy service (requires VITE_SCRAPE_TOKEN configuration).

Reddit via Scrape.do

Aggregates community discussions and reactions from relevant subreddits.

Sentiment Timeline Chart

Track sentiment evolution over time with interactive timeline charts:
// Source: SentimentChart.tsx
const ranges = [
  { label: '6H', hours: 6 },
  { label: '12H', hours: 12 },
  { label: '24H', hours: 24 },
  { label: '3D', hours: 72 },
  { label: '7D', hours: 168 },
];
  • Multi-line visualization: Positive, negative, and neutral trends
  • Time range selector: 6H, 12H, 24H, 3D, 7D
  • Interactive tooltips: Hover to see exact values and volume
  • Responsive design: Adapts to panel width

Key Metrics

Volume Tracking

Monitor conversation volume and detect viral trends:
// Source: mockData.ts
export function formatVolume(n: number): string {
  if (n >= 1_000_000) return (n / 1_000_000).toFixed(1) + 'M';
  if (n >= 1_000) return (n / 1_000).toFixed(1) + 'K';
  return n.toString();
}
Example: A topic with 284,500 mentions displays as 284.5K

Volatility Score

Measures how rapidly sentiment is changing (0-100 scale):
  • 0-40: Stable, predictable sentiment
  • 41-70: Moderate fluctuations
  • 71-100: Highly volatile, rapid sentiment shifts
High volatility often indicates breaking news, controversies, or viral moments that require immediate attention.

Live Summary Generation

When you open a topic, the AI Summary panel automatically:
  1. Fetches live data from all configured sources (X, Reddit, YouTube, News)
  2. Analyzes emotions using keyword-based scoring across 6 emotions
  3. Generates insights using tiered LLM fallback:
    • Tier 1: Gemini 2.0 Flash (if VITE_GEMINI_API_KEY configured)
    • Tier 2: Groq Llama 3.3 70B (if VITE_GROQ_API_KEY configured)
    • Tier 3: Local analysis (always available, no API required)
// Source: TopicDetail.tsx
const analysis = analyzeTopicFully(
  topic.title,
  headlines,      // Google News RSS
  comments,       // YouTube comments
  scrapedPosts,   // X & Reddit via Scrape.do
  scrapeDoResults // Per-source status
);
The system displays a real-time status badge showing which data sources are active: “Live from X · Reddit · YouTube · News”

Best Practices

Monitor High-Volatility Topics

Set up scheduled monitoring for topics with volatility scores above 70 to catch rapid sentiment shifts.

Cross-Reference Sources

Compare sentiment across different platforms (X vs YouTube vs Reddit) to identify platform-specific narratives.

Track Volume Spikes

A sudden +50% volume increase often signals breaking news or viral moments—investigate immediately.

Use Timeline Context

Always check the 24H or 7D timeline to understand if current sentiment is an anomaly or a trend.

Configuration

To enable all data sources, configure these environment variables in your .env file:
# Required for YouTube comments
VITE_YOUTUBE_API_KEY=your_youtube_api_key

# Required for X & Reddit scraping
VITE_SCRAPE_TOKEN=your_scrape_do_token

# Optional: AI summary generation
VITE_GEMINI_API_KEY=your_gemini_api_key
VITE_GROQ_API_KEY=your_groq_api_key
Without these keys, the platform falls back to keyword-based analysis and local summary generation—still fully functional but with reduced data sources.

Build docs developers (and LLMs) love