Analyzing Public Discourse on Urbanism: Topic Clustering, Sentiment Analysis and Retrieval-Augmented Generation using YouTube Comments
Organizations: Luddy School of Informatics, Computing and Engineering, Indiana University, Indianapolis, Indiana, USA
Abstract
Online discourse about urban issues - walkability, cycling infrastructure, public transit, housing density, and street safety - is voluminous but unstructured, and existing city-evaluation tools capture none of it. We present a pipeline and conversational system that combines geographic entity resolution, topic modeling, sentiment analysis, and Retrieval-Augmented Generation (RAG) over 22,788 chunks of YouTube transcripts and comments spanning 309 North American cities. Beyond the system itself, our contribution is a set of measurements about what happens when standard NLP components meet short, informal, geographically ambiguous text. A Twitter-tuned RoBERTa classifier outperforms a VADER lexicon baseline by 12.6 macro-F1 points (0.589 vs. 0.464; McNemar p = 0.0001), but both models collapse on the neutral class, which dominates urbanist comment traffic; annotators disagree on the same class (Cohen's kappa = 0.53). Dense retrieval beats a TF-IDF baseline at every cutoff (P@5 0.790 vs. 0.560), and video-level relevance proxies understate chunk-level precision by a wide margin (0.660 vs. 0.94 under human rating). For groundedness evaluation, we find BERTScore unusable when a multi-sentence generated summary is compared against a single short comment - scores are nearly flat regardless of relevance - and show that ROUGE-1-based groundedness is a paraphrase-driven lower bound rather than a hallucination rate. These findings generalize beyond the urbanist domain to any RAG system built over short user-generated documents.
Figures & tables
| City | Top dimensions (weight) | Neg. | Neu. | Pos. |
|---|---|---|---|---|
| Houston | car_dependency (.361), walkability (.303), transit (.170) | 57.2% | 26.4% | 16.4% |
| New York † | car_dependency (.535), transit (.191), walkability (.111) | 51.7% | 33.9% | 14.4% |
| Chicago | transit (.347), car_dependency (.332), walkability (.154) | 40.4% | 25.4% | 34.3% |
| Manhattan † | car_dependency (.546), transit (.206), walkability (.110) | 38.3% | 46.9% | 14.8% |
| Seattle | transit (.484), car_dependency (.264), walkability (.092) | 41.4% | 27.6% | 30.9% |
| London ‡ | car_dependency (.392), transit (.283), walkability (.129) | 40.9% | 36.7% | 22.4% |
| Model | P | R | F1 (macro) | MCC |
|---|---|---|---|---|
| VADER (lexicon) | 0.510 | 0.510 | 0.464 | 0.261 |
| Transformer (cardiffnlp) | 0.588 | 0.601 | 0.589 | 0.393 |
| F1 | Recall | |||||
|---|---|---|---|---|---|---|
| Model | Pos. | Neg. | Neu. | Pos. | Neg. | Neu. |
| VADER | 0.50 | 0.55 | 0.35 | 76.0% | 52.4% | 24.6% |
| Transformer | 0.54 | 0.71 | 0.51 | 54.7% | 79.6% | 45.9% |
| Method | P@5 | R@5 | P@10 | R@10 |
|---|---|---|---|---|
| Dense (FAISS) | 0.790 | 0.230 | 0.660 | 0.372 |
| TF-IDF baseline | 0.560 | 0.183 | 0.545 | 0.302 |
| Metric | Score |
|---|---|
| Groundedness rate (ROUGE-1 0.15) | 23.3% [10.0–35.0] |
| Mean / median ROUGE-1 recall | 0.139 / 0.135 |
| Mean / median cosine similarity | 0.730 / 0.727 |
| Query-side city detection accuracy | 100.0% (20/20) |
| Feature detection accuracy | 80.0% (16/20) |
| Query | ROUGE-1 | Cosine | Grounded |
| What do people say about road safety in Charlotte? | 0.206 | 0.777 | ✓ |
| What is housing like in Montreal? | 0.172 | 0.716 | ✓ |
| Are there good bike lanes in Seattle? | 0.169 | 0.778 | ✓ |
| How dense is housing in Montreal? | 0.166 | 0.722 | ✓ |
| How do people feel about car dependency in Houston? | 0.155 | 0.721 | ✓ |
| How is cycling infrastructure in Portland? | 0.153 | 0.751 | ✓ |
Retrieval-Augmented Generation
Retrieval-augmented generation connects language models to external knowledge so answers can use current, domain-specific evidence.
See all 792 papers