ThuggerDaily / NarrativePulse is a public narrative analytics project focused on discourse around the YSL RICO trial, Young Thug, Gunna, YFN Lucci, and ThuggerDaily activity. The repository combines original data collection and cleaning notebooks, topic-modeling work, statistical analysis, and a deployable Streamlit dashboard.
The project is framed as legal-media and public discourse measurement. It estimates temporal alignment, sentiment shifts, engagement patterns, topic prevalence, and event-linked narrative signals. It does not claim to prove legal causality, court impact, or definitive public opinion change.
The Streamlit app lives in narrativepulse-ysl-dashboard/.
Core dashboard features include:
- Executive KPIs and cross-platform summary
- Data source and coverage diagnostics
- Multi-platform sentiment trends
- ThuggerDaily influence-signal analysis
- Topic modeling and topic-level interpretation
- Statistical inference, including pre/post tests, effect sizes, lag correlations, and regression summaries
- Causal-style event study views with attribution caveats
- Timeline report generation with local Ollama support and a template fallback
- Methodology and privacy documentation
.
|-- Codes/
| |-- Data Collection/
| `-- Data Cleaning/
|-- Topic modeling/
|-- narrativepulse-ysl-dashboard/
| |-- app.py
| |-- pages/
| |-- src/
| |-- scripts/
| |-- data/
| |-- notebooks/
| |-- reports/
| `-- tests/
|-- requirements.txt
`-- README.md
From the repository root:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cd narrativepulse-ysl-dashboard
streamlit run app.pyThe dashboard loads data in this order:
- Neon/Postgres, if
DATABASE_URLorNEON_DBis configured. - Local processed CSV files in
narrativepulse-ysl-dashboard/data/processed/. - Generated demo data as a fallback.
Original collection and cleaning work is stored in Codes/. Topic modeling experiments and visual diagnostics are stored in Topic modeling/.
The dashboard expects standardized processed outputs such as:
posts_master.csvthuggerdaily_posts.csvtrial_events.csvtopic_assignments.csventity_timeseries.csvplatform_summary.csv
To rebuild processed dashboard data:
cd narrativepulse-ysl-dashboard
python scripts/build_processed_data.pyTo upload processed data to Neon/Postgres:
cd narrativepulse-ysl-dashboard
python scripts/upload_processed_to_neon.pyLarge raw and processed data files should not be committed.
For Streamlit Community Cloud, use:
Main file path: narrativepulse-ysl-dashboard/app.py
Configure one of the following secrets:
DATABASE_URL = "postgresql://..."or:
NEON_DB = "postgresql://..."Detailed deployment notes are in narrativepulse-ysl-dashboard/DEPLOYMENT.md.
Dashboard tests are under narrativepulse-ysl-dashboard/tests/. Run them from the dashboard directory:
cd narrativepulse-ysl-dashboard
pytestThe project uses Python data engineering, cross-platform schema standardization, sentiment scoring, engagement normalization, topic modeling, event-window analysis, exploratory lag correlations, and observational causal-inference-style summaries.
All findings should be interpreted as descriptive or temporal-association evidence unless supported by a specific statistical design and clearly stated assumptions.
This repository is intended for portfolio and research demonstration using public or processed data. Do not commit credentials, private legal records, confidential source material, raw scraped data containing sensitive fields, or local .env files.