Inspiration
As Drexel students, we noticed a gap in how campus mental health resources connect with students’ real-time struggles. Inspired by the raw, anonymous conversations on r/Drexel, we envisioned a tool to analyze these posts and provide actionable insights for college counselors to better support students.
What it does
rInsight is an AI-powered web platform that scrapes and analyzes anonymous posts from Drexel’s subreddit,in real time, to assess student mental health. Using NLP specifically, topic modeling, it categorizes posts into academic, financial, health, housing, and social issues, generating a standardized Stress Score (0–100) based on sentiment, keyword severity, and post engagement. Integrated with Google’s Gemini AI, rInsight provides counselors with actionable insights and tailored recommendations linked to Drexel resources, empowering them to address student needs proactively and effectively. It is our attempt at helping counsellors, help us better.
The stress score is calculated as: Stress Score=100−(𝑤1 ⋅ (1−𝑆)+𝑤2 ⋅ KF+𝑤3 ⋅ E+𝑤4 ⋅ ASP) × 100
- Sentiment Score (𝑆): A value from -1 (very negative) to 1 (very positive) derived from sentiment analysis of r/Drexel posts.
- Keyword Frequency (KF): The frequency of stress-related keywords (e.g., “exam,” “dorm”) in posts, normalized to a 0–1 scale (higher frequency = more stress).
- Engagement (E): A metric based on post upvotes and comments, normalized to 0–1 (higher engagement on negative posts = more stress).
- Academic Stress Peak (ASP): A binary or weighted factor (0–1) that increases during known stress periods like midterms or finals, based on the date range.
Where:
- 𝑤1, 𝑤2, 𝑤3, 𝑤4: Weights for each factor sum up to 1.
- 1−𝑆: Converts sentiment to a stress indicator - The result is subtracted from 100 so that a higher stress level yields a lower score (e.g., a score of 17 indicates high stress).
- Interpretation: Score < 50: Critical stress (e.g., 17). Score 50–70: Moderate stress. Score > 70: Low stress.
How we built it
We developed rInsight using a modern web stack:
- Frontend: A single
index.htmlfile powered by React for dynamic rendering, Chart.js for visualizations, Flatpickr for date selection, and TailwindCSS for styling. The UI features animated gauges, gradient text, and a clean card-based layout. - Backend: A Flask server (
app.py) in Python to serve API endpoints (/api/stress-scores,/api/keywords,/api/recent-insights) with sample data for demo purposes. - APIs: Reddit API for live r/Drexel post data, Gemini AI (for sentiment analysis and keyword extraction).
Challenges we ran into
- Loading Issues: The app frequently got stuck on a loading spinner due to API fetch failures. We implemented retry logic and sample data fallbacks, but flaky CDN dependencies (e.g., Chart.js) caused JavaScript errors.
- Data Validation: Ensuring API responses matched the expected structure was tricky. We added validation functions to prevent rendering errors.
- UI/UX Balance: Merging the Recommended Actions into the Resources tab without breaking the visual design you liked was a delicate task, but we preserved the gradient text, hover animations, and card effects.
Accomplishments that we're proud of
- Live Reddit Integration: Successfully integrated the Reddit API to fetch and analyze live r/Drexel posts, providing real-time mental health insights.
- Polished UI/UX: Created an intuitive dashboard with animated gauges, trends, and a resources tab that you love, complete with gradient text and hover effects.
- Team Growth: As a team, we honed our skills in React, Flask, and debugging complex web apps under tight deadlines.
What We Learned
- Error Handling is Key: Adding retry logic, data validation, and sample data fallbacks is crucial for a reliable user experience.
- Backend Debugging: Troubleshooting Flask server issues (e.g., port conflicts) taught us to monitor server logs closely and manage processes effectively.
What's Next
- Deployment: Host rInsight on a cloud platform like Heroku or AWS for broader access by Drexel counselors.
- Expand: Make it accessible to other Colleges, also include data from other social media.
Log in or sign up for Devpost to join the conversation.