How thefpiasta/study-cultural-analytics-code works
This is a course-project repository combining a Django cultural-analytics application with standalone hashtag-clustering scripts, a SQLite browser, and a Tesseract HTTP service. In the main workflow, scraper endpoints collect and persist social-media data; analyzer endpoints process images and save OCR and visual/sentiment features; visualizer endpoints expose visual analyses, while a separate chat endpoint calls an LLM. The graph also preserves the documented standalone tools. Some paths are unsampled, so only evidenced relationships are drawn; the SQLite viewer’s internal wiring is not established by the excerpts.
Main entry points: image_processor.py Image processing · analyzer/views.py Analyzer endpoints · visualizer/views.py Visualizations · index.ts HTTP endpoints
Components 30
Django analytics
- Scraper API
django-app/scraper/apis.py - Scrape records
django-app/scraper/models.py - Analyzer endpoints
django-app/analyzer/views.py - Image processing
django-app/analyzer/services/image_processor.py - OCR extraction
django-app/analyzer/utils/easyocr.py - Image color
django-app/analyzer/utils/color_analysis.py - Text colors
django-app/analyzer/utils/text_colors.py - VADER sentiment
django-app/analyzer/utils/vaderSentiment.py - Text sentiment
django-app/analyzer/utils/text_sentiments.py - LLM sentiment
django-app/analyzer/utils/llm_sentiment.py - Font estimation
django-app/analyzer/utils/font_size.py - Analysis results
django-app/analyzer/models.py - Visualizations
django-app/visualizer/views.py - Chat endpoint
django-app/chat_bot/views.py
Hashtag clustering
- Mapping generator
data/mapping_hashtag_cluster_group/create_mapping.py - Cluster categories
data/mapping_hashtag_cluster_group/AI_group_cluster.py - Cluster key extraction
data/mapping_hashtag_cluster_group/extract_cluster_keys.py - Group generation
data/mapping_hashtag_cluster_group/generate_groups.py
Tesseract service
- HTTP endpoints
llm/tesseract/tesseract-server-master/src/providers/http/index.ts - OCR processor
llm/tesseract/tesseract-server-master/src/processor/index.ts - CLI options
llm/tesseract/tesseract-server-master/src/argv/yargs.ts - Worker pool
llm/tesseract/tesseract-server-master/src/processor/createWorkerPool.ts - Worker interface
llm/tesseract/tesseract-server-master/src/processor/worker/index.ts - Tesseract process
llm/tesseract/tesseract-server-master/src/processor/worker/process/index.ts - Output buffering
llm/tesseract/tesseract-server-master/src/processor/worker/process/buffer.ts
SQLite viewer
- SQLite browser UI
data/database/sqlite/sqlite-viewer-gh-pages/js/main.js - SQLite WASM
data/database/sqlite/sqlite-viewer-gh-pages/js/sql-wasm.js
Other components
- API user
- LM Studio
- Tesseract executable
Connections 28
- API user → Scraper API: requests data
README.md - Scraper API → Scrape records: persists records
django-app/scraper/apis.py - API user → Analyzer endpoints: requests analysis
README.md - Analyzer endpoints → Image processing: invokes processing
django-app/analyzer/views.py - Analyzer endpoints → Analysis results: reads and writes
django-app/analyzer/views.py - Image processing → OCR extraction: extracts text
django-app/analyzer/services/image_processor.py - Image processing → Image color: gets image color
django-app/analyzer/services/image_processor.py - Image processing → Text colors: extracts text colors
django-app/analyzer/services/image_processor.py - Image processing → VADER sentiment: analyzes sentiment
django-app/analyzer/services/image_processor.py - Image processing → Text sentiment: analyzes text
django-app/analyzer/services/image_processor.py - Image processing → LLM sentiment: requests sentiment
django-app/analyzer/services/image_processor.py - Image processing → Font estimation: estimates fonts
django-app/analyzer/services/image_processor.py - Image processing → Analysis results: saves results
django-app/analyzer/services/image_processor.py - Image processing → Scrape records: uses scrape records
django-app/analyzer/services/image_processor.py - API user → Visualizations: requests charts
README.md - Visualizations → Scrape records: reads scrape data
django-app/visualizer/views.py - Visualizations → Analysis results: reads analysis
django-app/visualizer/views.py - API user → Chat endpoint: sends message
django-app/chat_bot/views.py - Chat endpoint → LM Studio: sends chat request
django-app/chat_bot/views.py - Mapping generator → Cluster categories: uses mapping
data/mapping_hashtag_cluster_group/create_mapping.py - API user → HTTP endpoints: uploads OCR job
llm/tesseract/tesseract-server-master/src/providers/http/index.ts - HTTP endpoints → OCR processor: submits OCR
llm/tesseract/tesseract-server-master/src/providers/http/index.ts - HTTP endpoints → CLI options: uses endpoint options
llm/tesseract/tesseract-server-master/src/providers/http/index.ts - OCR processor → Worker pool: acquires worker pool
llm/tesseract/tesseract-server-master/src/processor/index.ts - Worker pool → Worker interface: creates workers
llm/tesseract/tesseract-server-master/src/processor/createWorkerPool.ts - Worker interface → Tesseract process: delegates execution
llm/tesseract/tesseract-server-master/src/processor/worker/index.ts - Tesseract process → Tesseract executable: spawns executable
llm/tesseract/tesseract-server-master/src/processor/worker/process/index.ts - Tesseract process → Output buffering: buffers output
llm/tesseract/tesseract-server-master/src/processor/worker/process/index.ts