How charlesdedampierre/bunkatopics works
Project Type and Purpose
• This is a full-stack, multi-component data-science platform for topic modeling, data cleaning, visualization, and frame analysis.
• Core library (“bunkatopics”) provides embedding, projection, clustering, Bourdieu mapping and manual cleaning functions.
• An optional HTTP API (Flask + Celery) exposes the functionality as services (REST endpoints + background tasks).
• Two UIs:
• A React-based web front-end (in /web) for interactive topic exploration.
• A Streamlit app (/streamlit/app.py) as an alternative lightweight UI.
• Documentation is generated with MkDocs (/docs, mkdocs.yml).
File Structure Analysis
• Top level:
• bunkatopics/ – core Python library (data model, cleaning, modeling, visualization).
• api/ – Flask app (bunka_api/app.py), Celery config, deployment assets, notebooks, tests.
• web/ – React single-page app (package.json, Dockerfile, nginx config).
• streamlit/ – Streamlit entry point.
• docs/ & site/ – docs source and generated site.
• Root config: Dockerfiles (API & worker), Makefile, GitHub Actions workflows.
• Key patterns:
• MVC–style separation in the Flask service (routes.py → jobs.py → processing_functions.py).
• Asynchronous task processing via Celery.
• Containerized deployment with Docker + Nginx.