About the Project
Pharmaceutical companies often discover public perception shifts too late after sales drop, rumors spread, or adverse narratives solidify. Meanwhile, patients and healthcare professionals continuously discuss drugs online, creating a real-time signal that is rarely captured systematically.
This project builds a real-time pharma perception dashboard that tracks how drugs like Crocin are discussed across social platforms. It analyzes where, when, and in what emotional context a drug is mentioned, converting scattered online conversations into actionable market intelligence.
The system answers simple but commercially relevant questions:
Is sentiment improving or deteriorating?
Are complaints clustered in specific regions?
How does one brand compare against competitors like Dolo or Calpol?
What Inspired It
The idea came from noticing how quickly narratives form around common drugs sometimes faster than official communication channels can respond. A single viral post can alter trust, even if the medicine itself hasn’t changed.
Instead of relying on slow surveys or post-hoc reports, the project explores whether public digital discourse itself can act as an early indicator of perception shifts, adverse sentiment, or emerging concerns.
How We Built It
The project was designed for speed, clarity, and demonstrability, keeping hackathon constraints in mind.
Data Collection
Drug mentions are fetched from Twitter and Reddit using APIs.
Each mention is tagged with timestamp, platform, and keyword context.
Backend & Analysis
FastAPI exposes endpoints for drug-wise analysis.
Text is processed using NLTK/VADER to classify sentiment as positive, negative, or neutral.
Frequency and co-occurrence analysis links drug names with sentiment-heavy terms (e.g., effective, side effects).
Database
A SQL database stores scraped mentions and sentiment scores for fast querying and comparison.
Frontend Dashboard
A Streamlit web app lets users input drug names.
Visualizations show sentiment trends over time, geographic spikes (India-focused), and brand comparisons.
The emphasis was on an end-to-end working system, not isolated scripts.
What We Learned
Public health conversations are highly emotional and uneven—volume spikes often indicate concern rather than adoption.
Even simple sentiment models can surface early warning patterns when applied at scale.
Building a full pipeline (API → DB → dashboard) exposes real-world issues that classroom NLP rarely touches.
Challenges Faced
API access limits constrained data volume.
Medical language is context-sensitive, making sentiment classification noisy.
Location data is incomplete, requiring inference and careful interpretation.
Despite this, the system demonstrates clear potential as a rapid perception-monitoring tool.
Built With
- css
- fastapi
- html
- javascript
- nltk
- sql
- vader
Log in or sign up for Devpost to join the conversation.