TPCraw: Reddit Sentiment Dashboard for Singapore Polytechnics
TPCraw monitors public discussion about Singapore’s polytechnics on Reddit. It collects posts and comments from the polytechnic subreddits, including r/TemasekPoly, analyses each one with Google’s Gemini model, and shows the results on an interactive dashboard. It runs automatically every day at 5 a.m. Singapore time, so the picture stays current.
What the dashboard shows
For each post and comment, the AI assigns a small set of labels: a sentiment score (positive, neutral or negative), an emotional tone, a topic such as academic, exams, facilities or internship, and whether the item relates to the School of Informatics and IT (IIT). The dashboard brings these together in charts:
- sentiment distribution
- an engagement-weighted sentiment score for each post
- sentiment trends over time by category
- the most engaged posts
You can filter by date range and by IIT relevance, and open any post to see its summary and comments.
Reading the results
Sorting thousands of short, informal posts by sentiment, emotion and topic is a judgement task with no single right answer, which suits a language model. The overall trends are informative even when a single label is debatable. The labels are generated by AI, so edge cases exist, and the IIT-relevance flag in particular is not always accurate. Check the original post before drawing conclusions from any single item.
How it works
The crawler uses the Python Reddit API wrapper to fetch recent posts and their comments, sends each one to the Gemini API for labelling and a short summary, and stores the results in Firebase Firestore. The dashboard is a web page built with Chart.js that reads from that store. A scheduled GitHub Action runs the crawler every day.
The project works only on public posts. The full source code is on GitHub.