...
Each percentage bar chart shows the percentage of items in dashboarddata by list_status (no_decision, working_up, active, unsuitable, suspended) at a quarter for the selected unit.
eE.g., Preston at Q1 2018 proportion of list_status = "working_up"
...
This graph presents a line graph per unit, where all units belong to the same region. The chart also includes a line graph for the region. Each point of a line graph represents the percentage of items in dashboarddata per unit, per quarter_id and list_status=”working_up'” over all dashboarddata items for all list_status and indicated unit, quarter_id.
eE.g., Preston at Q1 2018 proportion of list_status = "working_up"
...
Each point of the region line graph computed as: region_count / region_total_count * 100, is equivalent to the following query:
eE.g., North West region at Q1 2020 and list_status = “working_up”
...
Similar computation as Graph2 with list_status = “no_decision”. This graph presents a line graph per unit, where all units belong to the same region. The figure also includes a line graph for the region. Each point of a line graph represents the proportion in percentage of items in dashboarddata per unit, per quarter_id and list_status=”no_decision” over all dashboarddata items for all list_status and indicated unit, quarter_id.
eE.g., Preston at Q1 2018 proportion of list_status = "no_decision"
...
Each point of the region line graph in the code is computed as region_count / region_total_count * 100, which is equivalent to the following query:
eE.g., North West region at Q1 2020 and list_status = “no_decision”
...
Proportion of dashboardata items per reason_id, quarter_id over all dashboarddata items of a quarter_id in a unit.
eE.g., Preston Q1 2018
select quarter_id, reason_id, count(reason_id) as count1 from txfirst_dashboarddata left join txfirst_quarter on quarter_id = txfirst_quarter.id where unit_id = 4 and txfirst_quarter.quarter = 201801 and list_status = "working_up" group by reason_id order by quarter_id
...
Main functions used for the graphs 4-7 called by get_reasons function
get_reason_counts function – sum of all dashboarddata records per reason_id, unit_id, quarter_id (all quarters: >= some quarter_id) in a unit
Ex: select quarter_id, reason_id, count(reason_id) as count1 from txfirst_dashboarddata left join txfirst_quarter on quarter_id = txfirst_quarter.id where unit_id = 4 and txfirst_quarter.quarter >= 201601 and list_status = "working_up" group by quarter_id, reason_id order by quarter_id
...