kailo_beewell_dashboard.who_took_part
Helper functions for the ‘Who took part’ section of the dashboard and report
Module Contents
Functions
|
Creates the title and introductory paragraph for the 'Who took part' |
|
Creates dictionary of headers for the demographic section |
|
Creates the plots for the Who Took Part page/section, with the relevant |
- kailo_beewell_dashboard.who_took_part.create_demographic_page_intro(school_size, output='streamlit')
Creates the title and introductory paragraph for the ‘Who took part’ demographic section of the dashboard/report
Parameters
- school_sizeinteger
Total number of pupils who completed at least one question at school
- outputstring
Specifies whether to write for ‘streamlit’ (default) or ‘pdf’.
Returns
- html_stringstring
Optional return, used when output==’pdf’, contains HTML for report.
- kailo_beewell_dashboard.who_took_part.demographic_headers(survey_type='standard')
Creates dictionary of headers for the demographic section
Parameters
- survey_typestring
Specifies whether this is for standard or symbol survey dashboard
Returns
- header_dictdictionary
Dictionary where key is a variable name, and value is the header
- kailo_beewell_dashboard.who_took_part.demographic_plots(dem_prop, chosen_school=None, chosen_group=None, group_lab='school_group_lab', output='streamlit', content=None, survey_type='standard', dashboard_type='school')
Creates the plots for the Who Took Part page/section, with the relevant headers and descriptions, for the streamlit dashboard or PDF report.
Parameters
- dem_propdataframe
Dataframe with proportion of each responses to demographic questions
- chosen_schoolstring
Optional input for school dashboard - name of the chosen school
- chosen_groupstring
Optional input for school dashboard - specifies whether to make plots ‘For your school’ or ‘Compared with other schools in Northern Devon’. Will do the latter unless you input ‘For your school’.
- group_labstring
Name of chosen group - default is school_group_lab.
- outputstring
Specifies whether to write for ‘streamlit’ (default) or ‘pdf’.
- contentlist
Optional input used when output==’pdf’, contains HTML for report.
- survey_typestring
Specifies whether this is for ‘standard’ (default) or ‘symbol’ survey dashboard.
- dashboard_typestring
Specifies whether this is for ‘school’ (default) or ‘area’ dashboard.
Returns
- contentlist
Optional return, used when output==’pdf’, contains HTML for report.