kailo_beewell_dashboard.bar_charts

Functions used to produce the two types of bar chart

Module Contents

Functions

create_group_list(drop[, page])

Creates list of the pupil groups who have been excluded as n<10. This is

survey_responses(dataset[, font_size, output, ...])

Create bar charts for each of the questions in the provided dataframe.

details_ordered_bar(school_scores, school_name[, ...])

Created ordered bar chart with the results from each school, with the

kailo_beewell_dashboard.bar_charts.create_group_list(drop, page='explore')

Creates list of the pupil groups who have been excluded as n<10. This is provided as a seperation function as wanted to create string depending on three use cases - with the example of year group…: (1) ‘Year 7’ pupils (2) ‘Year 7 and Year 9’ pupils (3) ‘Year 7, Year 8 and Year 9’ pupils (or longer)

Parameters

dropseries

Contains the names of the groups that had less than 10 responses

pagestring

Specifies whether this is for the ‘explore’ page or ‘demographic’ page. Default is the ‘explore’ page.

kailo_beewell_dashboard.bar_charts.survey_responses(dataset, font_size=16, output='streamlit', content=None, page='explore')

Create bar charts for each of the questions in the provided dataframe. The dataframe should contain questions which all have the same set of possible responses.

Parameters

dfdataframe

Dataframe to create plot from (e.g. chosen_result)

font_sizeinteger

Font size of x axis labels, y axis labels and legend text, default=16

outputstring

Use of function - either for streamlit page or PDF report Must be either ‘streamlit’ or ‘pdf, default is ‘streamlit.

contentlist

Optional input used when output==’pdf’, contains HTML for report.

pagestring

Specifies whether this is for the ‘explore’ page or ‘demographic’ page. Default is the ‘explore’ page.

Returns

contentlist

Optional return, used when output==’pdf’, contains HTML for report.

kailo_beewell_dashboard.bar_charts.details_ordered_bar(school_scores, school_name, font_size=16, output='streamlit', content=None)

Created ordered bar chart with the results from each school, with the chosen school highlighted

Parameters

school_scoresdataframe

Dataframe with mean score at each school (e.g. between_schools)

school_namestring

Name of school (matching name in ‘school_lab’ col)

font_sizeinteger

Font size of x axis labels, y axis labels and legend text, default=16

outputstring

Use of function - either for streamlit page or PDF report Must be either ‘streamlit’ or ‘pdf, default is ‘streamlit.

contentlist

Optional input used when output==’pdf’, contains HTML for report.

Returns

contentlist

Optional return, used when output==’pdf’, contains HTML for report.