Features
Feature List
| Feature | Summary | Roles | Status |
|---|---|---|---|
| Table selection | Lists tables under cs.cs_dm and lets the user pick one to analyze |
Viewer | Implemented |
| Question type switch | Toggles between Text Select and Free Text, changing the downstream display |
Viewer | Implemented |
| Question selection | Lists questions present in the selected table and question type | Viewer | Implemented |
| Single-question chart | Renders per-choice response breakdown for the selected question with Chart.js | Viewer | Implemented |
| All-questions grid | Shows every Text Select question of the table in a single grid |
Viewer | Implemented |
| Free-text heatmap | Visualizes the frequency of Free Text answers with color intensity |
Viewer | Implemented |
| Free-text response table | Displays the responses of the selected free-text question in a table | Viewer | Implemented |
| Sample chart | Development sample rendering question_number=03 from the fixed view dm_vis_jreslso_tokyo23_comp_test |
Developer | Implemented (sample) |
| Health check | Returns service status via GET /api/health |
External system | Implemented |
| Home page | Labeled "survey overview" in the sidebar, but contains only a heading | Viewer | Not implemented |
| Comparison by attribute | Switching is_comp to compare across respondent attributes |
Viewer | Not implemented |
Feature Details
Multiple-choice question visualization (Text Select)
The main feature of pages/Sample2. Selecting a table fetches the questions where question_type = 'Text Select', and the chosen question is rendered as a chart of response counts and rates per choice. All Text Select questions of the same table are also listed in a grid.
The backend always filters by is_comp = 'ใในใฆใฎๆๅนๅ็ญ', so only the aggregate over all valid responses is displayed.
Roles: Viewer
Use case:
- Open "Sample2" from the sidebar
- Pick the table to analyze in step 1
- Choose
Text Selectas the question type (the default) - Pick a question in step 2
- Review the chart for the selected question and the grid of all questions
Free-text question analysis (Free Text)
The display shown when Free Text is chosen as the question type. It calls the same all_questions API with question_type=Free Text, aggregates the answers on the frontend (components/FreeTextAnalysis/freeTextUtils.ts), and renders a heatmap where more frequent answers get a darker background, plus a response table.
Roles: Viewer
Use case:
- Pick a table
- Choose
Free Textas the question type - Scan the heatmap for frequent topics
- Switch questions and read individual answers in the response table
Table and question metadata retrieval
The two paths differ: Unity Catalog metadata (table listing) goes through the databricks-sdk WorkspaceClient, while the question list comes from a SELECT DISTINCT against the SQL Warehouse.
Roles: Viewer (indirectly), service principal
Use case:
- The frontend calls
GET /api/catalogs/cs/schemas/cs_dm/tables - After selection, it calls
GET .../tables/{table}/questions?question_type=...for the question list