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_standard_responses(df, site_col)

Aggregate responses to standard survey (non-demographic), using functions

aggregate_symbol_responses(df, site_col)

Aggregate responses to symbol survey (non-demographic), using functions

add_keys(groups, value, keys)

Add multiple keys with the same value to the dictionary

add_standard_topic_groups(df)

Adds a 'group' column providing topic group for each item in 'measure',

add_standard_response_labels(df)

Adds labels for each of the survey questions (non-demographic) in the

add_symbol_response_labels(df)

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

kailo_beewell_dashboard.synthesise_responses.add_standard_response_labels(df)

Adds labels for each of the survey questions (non-demographic) in the standard survey

Parameters

dfdataframe

Dataframe containing ‘measure’ column which we want to add labels to

kailo_beewell_dashboard.synthesise_responses.add_symbol_response_labels(df)

Adds labels for each of the survey questions (non-demographic) in the symbol survey

Parameters

dfdataframe

Dataframe containing ‘measure’ column which we want to add labels to