How vanderitto/cityzen_pulse works
Cityzen Pulse ingests football-community posts, persists them for analysis, and presents fan sentiment and discussion in a Streamlit dashboard. Its main workflow is a recurring Reddit scrape, filtering, and dual write to PostgreSQL and a Hive-style JSON data lake; the dashboard then reads PostgreSQL, performs on-the-fly sentiment and topic inference, and visualizes the results. The README also describes fixture schedules and a Jupyter exploration environment. Source evidence is strongest for the sampled ingestion and dashboard code; unsampled database setup and notebook behavior are represented only where the tree or README supports them.
Main entry points: app.py Streamlit dashboard · main.py Ingestion worker · scrapers.py Reddit scraper · database.py Post writer
Components 13
Ingestion
- Ingestion worker
ingestion/main.py - Reddit scraper
ingestion/scrapers.py
Data Storage
- Hive JSON lake
ingestion/main.py - Post writer
ingestion/database.py - PostgreSQL
db/init.sql
Dashboard and Analysis
- Streamlit dashboard
frontend/app.py - Post retrieval
frontend/app.py - Sentiment and topics
frontend/app.py - Fixture schedule
frontend/app.py
Exploration
- Jupyter exploration
notebooks/01_mcfc_eda.ipynb
Other components
- Dashboard user
- Football data API
Connections 11
- Ingestion worker → Reddit scraper: fetches posts
ingestion/main.py - Reddit scraper → Reddit: requests posts
ingestion/scrapers.py - Ingestion worker → Hive JSON lake: writes JSON
ingestion/main.py - Ingestion worker → Post writer: saves posts
ingestion/main.py - Post writer → PostgreSQL: upserts posts
ingestion/database.py - Streamlit dashboard → Post retrieval: loads dashboard data
frontend/app.py - Post retrieval → PostgreSQL: queries posts
frontend/app.py - Streamlit dashboard → Sentiment and topics: runs inference
frontend/app.py - Streamlit dashboard → Fixture schedule: loads fixtures
frontend/app.py - Fixture schedule → Football data API: requests matches
frontend/app.py - Dashboard user → Streamlit dashboard: views insights
README.md