Industry Layoff TrackerData · 2024Code ↗
Measuring the mood of layoff season.
A crawler-and-workers pipeline over Reddit and 4chan, scoring every post for toxicity and sentiment. It ended up proving our own hypothesis wrong.
- Project
- Team project
- Timeline
- Fall 2024
- Stack
- Python, Faktory, MongoDB, Flask
- Status
- Shipped
- 200k+
- posts a month
- 2
- sources, one schema
- 1 hr
- to notice an outage
- Top
- submission in the class
A week of data, gone quietly.
During the US election traffic surge, the 4chan crawler started failing silently. Nothing crashed and nothing alerted. We found out a week later, when the charts had a hole in them.
Making it heal itself.
The fix wasn't a better crawler. It was noticing. An hourly monitor checks every source, emails us and logs an incident, and a backfill job re-crawls the gap one day at a time with rotated keys.
Workerstoxicity · VADER
Same scoring as before. Backfilled posts get scored like any other.
Click any step for details · Run walks a request through each step
Why Mongo, not SQL.
We kept discovering new things to measure. With a document store each new signal was a field, not a migration. We agreed to revisit SQL if the schema held still for three weeks. It never did.
{source: "reddit",community: "r/jobs",title: "Laid off after 6 years, what now?",created_utc: 1730419200,score: 412,toxicity: { "class": "normal", "confidence": 0.91 },sentiment: { "vader": -0.62, "weighted": -0.48 },emotional_relevance: 0.73,}
- Mongo: add a field. SQL: migrate, backfill, restart workers.
The data disagreed with us.
We assumed the market was collapsing and fear would only rise. The data said otherwise: fear spiked just before real layoff news, then faded, and mentions of being unemployed drifted down.
We changed the story to match the data. That pivot is what the project was graded on.
- fear sentiment (weighted)
- mentions of “unemployed”
- real layoff news
- illustrative shape, not raw data