Survey tools

survey.py module

API reference

class pyphyschemtools.survey.SurveyApp(mode='participant', base_dir='ML-survey')[source]

Bases: object

analyze_text_columns(df=None, columns=None, top_n=20)[source]

Basic textual analysis: show frequent words, word clouds, and per-question summary.

build_admin_dashboard()[source]
build_participant_form()[source]
enable_slider_css()[source]

Inject CSS for hover/active color effects on sliders.

get_or_create_user_id()[source]

Return a persistent anonymous ID (stored in .survey_id).

list_drafts()[source]
load_all_responses()[source]

Load and merge all .csv survey responses into a DataFrame.

load_draft(b)[source]
load_questions()[source]
plot_spider_multi(df, title='Participant and Mean Scores per Block', savepath=None, figsize=(12, 8))[source]

Draw radar (spider) chart with per-participant transparency and block names instead of A–F.

print_questions_summary()[source]

Affiche la liste des questions par bloc et leur type (Numérique/Texte).

run()[source]
save_draft(b)[source]
semantic_analysis(df=None, columns=None, n_clusters=3)[source]

Perform semantic clustering on open-ended responses using sentence-transformers.

submit_form(b)[source]
summarize_by_block(df)[source]

Compute average score per block (A–F) for numeric questions.