kailo_beewell_dashboard.synthesise_responses
Functions analysing responses to each question - as part of several files which provide functions for synthesis (creation and aggregation) of data for the dashboard.
Module Contents
Functions
|
Aggregate responses to standard survey (non-demographic), using functions |
|
Aggregate responses to symbol survey (non-demographic), using functions |
|
Add multiple keys with the same value to the dictionary |
Adds a 'group' column providing topic group for each item in 'measure', |
|
Adds labels for each of the survey questions (non-demographic) in the |
|
Adds labels for each of the survey questions (non-demographic) in the |
- kailo_beewell_dashboard.synthesise_responses.aggregate_standard_responses(df, site_col)
Aggregate responses to standard survey (non-demographic), using functions including aggregate_proportions() and results_by_site_and_group().
Parameters
- dfdataframe
Pupil-level survey responses
- site_colstring
Name of column with site to group by (e.g. ‘school_lab’, ‘site’)
- kailo_beewell_dashboard.synthesise_responses.aggregate_symbol_responses(df, site_col)
Aggregate responses to symbol survey (non-demographic), using functions including aggregate_proportions() and results_by_site_and_group().
Parameters
- dfdataframe
Pupil-level survey responses
- site_colstring
Name of column with site to group by (e.g. ‘school_lab’, ‘site’)
- kailo_beewell_dashboard.synthesise_responses.add_keys(groups, value, keys)
Add multiple keys with the same value to the dictionary
Parameters
- groups: defaultdict
Dictionary with measure as key and group as value
- valuestring
Value for all the keys
- keysarray
Array with the keys
- kailo_beewell_dashboard.synthesise_responses.add_standard_topic_groups(df)
Adds a ‘group’ column providing topic group for each item in ‘measure’, for the standard survey responses
Parameters
- dfDataframe
Dataframe containing ‘measure’ column, which we want to add ‘group’ column to