Skip to main content
See Analyzing responses for worked examples.

list_questions()

The study’s questions that are eligible for one kind of analysis.
str | AnalysisCategory
required
text (free text you can cluster), scale or options.
Returns AnalyzableQuestionsOut. Each question’s id is what the other methods take as question_id.

get_scale_responses()

Response counts per scale value, for a scale question. Returns ScaleResponsesOut.

get_options_responses()

Response counts per option, for a single- or multi-select question. Returns OptionsResponsesOut.

cluster()

Group participants’ free-text answers to one question into labeled themes using k-means. The result is saved and becomes the study’s latest clustering run.
str
The question to cluster.
int
Alternative to question_id, for linear studies.
int
default:"3"
Number of clusters, from 2 to 20. Too few responses for the requested count raises ValidationError.
Returns ClusteringOut.

get_optimal_clusters()

Estimate the best cluster count for a question using the elbow method. Returns optimal_k, plus the k_values and inertias it was chosen from if you want to plot the curve. Returns OptimalClustersOut.

get_latest_clustering()

The study’s most recent saved clustering run. exists is False if there isn’t one. Returns ClusteringOut.