YouTube Sentiment Analysis Dashboard

Video: "Esto es lo que nadie te cuenta de El Salvador"  ·  Corpus: 4,314 comments

Total Comments
4,314
Dominant Sentiment
Positive
Avg. Model Confidence
0.78
High Confidence (>0.8)
54.2%

What does it show? Daily comment volume broken down by sentiment since the video's publication. Each colored band (■ Positive, ■ Neutral, ■ Negative) is stacked to show the cumulative daily total.
Interpretation: The largest spike occurred on 2026-02-01 with 1,915 comments — a typical YouTube pattern driven by the recommendation algorithm at publication. Sentiment proportions remain stable over time, with no abrupt tone shifts linked to external events.

What does it show? Average number of likes per comment by sentiment category. Likes serve as a social resonance indicator — how many users agreed with or valued that comment.
Interpretation: Positive comments receive far more likes on average, showing that the actively engaging community leans more favorable than the overall commenter pool. Positive comments alone captured 71.7% of all corpus likes.

What does it show? Absolute count of comments classified into each sentiment category by the RoBERTuito model.
Interpretation: Positive 41.6% · Negative 35.5% · Neutral 22.9%. The non-uniform distribution confirms the model effectively discriminates between classes rather than assigning categories randomly.

What does it show? Distribution of the softmax confidence score the model assigns to each prediction. The golden dashed line marks the high-confidence threshold (0.80).
Interpretation: Positive and Negative classes skew right (high certainty). Neutral shows greater spread because it groups ambiguous or very short comments that are intrinsically harder to classify with confidence.

What does it show? Each dot is a comment projected into 2D via PCA on TF-IDF vectors. Colors correspond to the model-assigned sentiment. K-Means finds 3 thematic clusters whose top terms appear in the side annotation.
Interpretation: Partial separation between sentiment groups confirms that different polarities use distinct vocabularies. Overlap in the center reflects thematically similar comments with opposing polarity — expected in political debates where the same topics are argued from contrasting viewpoints.

What does it show? Top 15 most discriminant terms per sentiment class by TF-IDF (Term Frequency – Inverse Document Frequency). TF-IDF penalizes common terms across all documents and highlights those specific to each category.
Interpretation: Each class has a distinct vocabulary: positives feature gratitude and support (gracias, paz, presidente), negatives articulate criticism (derechos, humanos, delincuentes), and neutrals describe context (años, país, video). This lexical separability validates the model's genuine decision boundaries.

What does it show? Top 15 geographic locations automatically detected in comment text using the GeoText library. Only 28.4% of the corpus contains an identifiable geographic reference.
Interpretation: El Salvador leads with 653 mentions, expected since the video directly discusses that country. Colombia, Venezuela, and Argentina reflect the transnational reach of the debate on Latin American security and governance.

What does it show? Sentiment breakdown within comments from the top 5 most active countries in the corpus.
Interpretation: Comparing countries reveals that the tone of the debate varies by geographic origin. Countries with similar experiences of political violence or government style tend to display distinct sentiment compositions compared to those with different political contexts.

Before vs. After NLP Preprocessing
Before preprocessing

📄 Raw text  ·  with stopwords & noise

After preprocessing

✨ Cleaned text  ·  stopwords removed & lemmatized

What does it show? The left cloud represents vocabulary before preprocessing: the largest words are Spanish stopwords (que, de, y, el, la, no) that carry no analytical meaning but dominate by raw frequency. The right cloud shows vocabulary after the NLP pipeline (stopword removal, spaCy lemmatization): semantically meaningful terms emerge. The corpus shrank from 146,131 to 71,308 words — removing 51% of lexical noise.
Interpretation: Salvador, Bukele, Juan and paz (peace) stand out as the central terms, confirming the debate revolves around the political figure, the video journalist, and the concept of public security.

Vocabulary by Sentiment Category (lemmatized text)
Positive

😊 Positive  ·  1,793 comments (41.6%)

Negative

😠 Negative  ·  1,531 comments (35.5%)

Neutral

😐 Neutral  ·  990 comments (22.9%)

What does it show? Most frequent vocabulary within each sentiment category after preprocessing. Each cloud uses its own color scheme for easy visual distinction.
Interpretation: Positive comments share supportive and grateful language (gracias, bien, paz, saludos, presidente). Negative comments concentrate critical discourse (derechos, humanos, delincuentes, precio, pandilla), with richer vocabulary reflecting more elaborate argumentation. Neutral comments feature descriptive and informational terms (salvador, país, años, video, canal) without clear polarity. The lexical separation between categories validates the classification model's coherence.

Key Findings
Finding 1 · Sentiment Distribution

RoBERTuito classified all 4,314 comments with a significantly non-uniform distribution: 41.6% positive, 35.5% negative, and 22.9% neutral. The positive-to-negative ratio of 1.17x indicates a slight favorable preponderance, though with substantial opposition reflecting the polarized nature of the political subject matter.

Finding 2 · Model Confidence

Average model confidence is 0.782, with 54.2% of predictions exceeding the high-confidence threshold (0.80). The Neutral class shows the lowest average confidence (~0.62), consistent with its diffuse nature: it groups short, ambiguous, or purely descriptive comments. Future work could benefit from applying a minimum confidence threshold to filter uncertain predictions before analysis.

Finding 3 · Engagement Asymmetry

Positive comments captured 71.7% of all corpus likes despite representing only 41.6% of comments. This social resonance asymmetry reveals that the actively engaging community leans more favorable than the overall commenter population. Supportive discourse generates greater visible collective endorsement, while critical comments receive less explicit validation.

Finding 4 · Thematic Clustering

TF-IDF and PCA analysis revealed comments organizing around distinct discursive subtopics: praise for the journalist, human rights debate, cross-country comparisons, and discussion of the "price of peace." This thematic structure is independent of sentiment, showing that people with opposing polarities argue the same topics from different angles — validating the corpus's value for political argumentation analysis.

Finding 5 · NLP Preprocessing Impact

The cleaning and lemmatization pipeline removed 51% of lexical noise (from 146,131 down to 71,308 effective words), reducing unique vocabulary from 19,946 to 12,795 terms. The word cloud comparison visually demonstrates how stopwords and symbols dominated the raw text, concealing the real semantic content that only emerges after preprocessing.

Finding 6 · Geographic Reach

With geographic references identified in 28.4% of the corpus and 194 distinct locations detected, the debate extends well beyond El Salvador. Participation from Colombia, Venezuela, Mexico, and Argentina confirms that perceptions of Bukele's security policies are part of a broader Latin American political conversation, where audiences from different countries project their own national realities onto the discussion.

Recommendations for Future Work
R1 · Manual Annotation

Manually label a representative sample (minimum 500 comments) to obtain real supervised metrics (precision, recall, F1-score) and validate RoBERTuito's performance in this specific domain. Without ground truth, the current evaluation can only be indirect.

R2 · Emotion Analysis

Go beyond three-class polarity and implement an emotion detection model (anger, joy, fear, surprise) using pysentimiento with task="emotion", providing greater granularity to understand which specific emotions the video content triggers.

R3 · Aspect-Based Sentiment (ABSA)

Apply Aspect-Based Sentiment Analysis to identify on which specific dimensions (security, economy, human rights, journalist image) each sentiment type is expressed. The current approach treats each comment as a uniform unit, ignoring that one text may carry different polarities per aspect.

R4 · Topic Modeling (BERTopic)

Replace K-Means + TF-IDF with BERTopic, which combines contextual embeddings (SBERT) with probabilistic clustering (HDBSCAN). BERTopic handles polysemy and thematic complexity in short comments far better, producing more coherent and interpretable topics.

R5 · Extended Temporal Analysis

Expand the corpus to include reply threads and extend the collection window to study long-term sentiment trends. Correlate activity spikes with external events (news, political statements) to understand what triggers shifts in the debate's tone.

R6 · Multimodal & Multilingual

Incorporate emoji and colloquial expression analysis as additional sentiment signals (currently removed during preprocessing). Also implement language detection to identify and analyze comments written in English and other languages present in the corpus.

NLP Pipeline: spaCy · NLTK · RoBERTuito (pysentimiento) · scikit-learn · Plotly · Python 3.13  |  Corpus: 4,314 comments · Video ID: pWnndG1K5Hg