Trends in Aged Care Star Ratings Visualised (Q4 FY23-24 update)
Data-visualisation
MOA-Benchmarking
Author
Filip Reierson
Published
November 17, 2024
In this article I share interactive graphs that allow readers to explore trends in Australian aged care star ratings for various groups of homes.
Note
The original version of this article was posted on June 25, 2024.
In this article I share interactive graphs that allow readers to explore trends in Australian aged care star ratings grouped by various variables. Most variables are directly taken from the quarterly star rating extracts, but provider size had to be derived, and regionality was modified by grouping MM3-5 and MM6-7. Additionally, service sizes for Q3 FY22-23 were missing, so I imputed these values based on data from the previous and subsequent quarter. I have included a description of each variable in Table 1. When grouped by ‘nothing’, all services are considered as a single group. By default, points are connected with a Catmull–Rom spline.
mutable data_raw = {const file =awaitFileAttachment("data.csv").csv({typed:true});return file;}mutable data = {if(legend.length===0) {const data = data_raw.filter(d=>d.variable===category_select.value)return data; } else {const data = data_raw.filter(d=>d.variable===category_select.value).filter(d=>legend.map(x=>x.name).includes(d.category));return data; }}
categories = [ {name:"nothing",value:"all"}, {name:"state/territory",value:"state_territory"}, {name:"service size",value:"size"}, {name:"provider size",value:"provider_size"}, {name:"regionality",value:"mmm_code"}, {name:"organisation type",value:"purpose"}]// Create the Observable inputviewof category_select = Inputs.select(categories, {label:"",format: (t) => t.name})html`<style> .dropdown-container { display: inline-block; position: relative; line-height: 1; /* Adjust line-height to match the text */ } select { border: none; border-bottom: 2px dotted grey; background: none; font-size: 1em; padding: 0 5px; -webkit-appearance: none; -moz-appearance: none; appearance: none; line-height: 1; /* Adjust line-height to match the text */ vertical-align: baseline; text-align: center; } select:focus { outline: none; } /* Add a small arrow for the dropdown */ .dropdown-container::after { content: '▼'; font-size: 0.7em; position: absolute; right: 5px; top: 50%; transform: translateY(-50%); pointer-events: none; } /* Adjusting padding and margin to align with the text */ .dropdown-container select { padding-right: 20px; }</style>`
viewof smoother_select = Inputs.select(['smooth','straight'])html`<span style="line-height: 2rem;">Aged care star ratings grouped by <span style="white-space: nowrap;"><span class="dropdown-container" style="width: 10rem;">${viewof category_select}</span>. </span>The categories are <span class="checkbox-styling">${viewof legend}</span>. Click the categories to include or exclude them from the graphs. Points are connected by <span class="dropdown-container" style="width: 5rem;">${viewof smoother_select}</span> lines. Click points to reveal the average star rating and number of services within each category and time period.</span>`
{if(legend.length&&legend.length>0) {returnhtml`${facetCharts.map(chart => chart)}${bar_chart}`; } else {returnhtml`Select at least one category.<div style="display: none;">${facetCharts.map(chart => chart)}${bar_chart}</div>`; }}
sortedCategories = averageNPerCategory.sort((a, b) => b.average_n- a.average_n).map(d => d.category);bar_chart = Plot.plot({marks: [ Plot.barY(averageNPerCategory, {x:"category",y:"average_n",fill: d => color_scheme.find(k => d.category=== k.name).color }), Plot.text(averageNPerCategory.filter(d => d.average_n>100), {x:"category",y:"average_n",text: d => d.average_n.toFixed(1),// Display average_n on each bardy:10,// Adjust position of text above the barfill:"white",// White text for higher valuestextAnchor:"middle",fontSize:14,fontWeight:"bold" }), Plot.text(averageNPerCategory.filter(d => d.average_n<=100), {x:"category",y:"average_n",text: d => d.average_n.toFixed(1),dy:-10,fill:"black",textAnchor:"middle",fontSize:14,fontWeight:"bold" }) ],x: {label:"Category",domain: sortedCategories // Set the domain to the sorted categories },y: {label:"Average n" },width:700,height:200});
Table 1: A description of the available variables.
Category
Description
State/Territory
NSW
New South Wales
VIC
Victoria
QLD
Queensland
WA
Western Australia
SA
South Australia
TAS
Tasmania
ACT
Australian Capital Territory
NT
Northern Territory
Service Size
Small
60 or fewer estimated number of clients
Medium
Between 61 and 100 estimated number of clients
Large
Greater than 100 estimated number of clients
Provider Size1
Small
Provider with 1-4 services
Medium
Provider with 5-19 services
Large
Provider with 20+ services
Regionality2
MM1
Metropolitan (MM1)
MM2
Regional centres (MM2)
MM3-5
Rural (MM3-5)
MM6-7
Remote (MM6-7)
Organisation Type
Government
Government
Not for profit
Not for profit
For profit
For profit
1 Provider size is based on the number of services with the same provider name in the star rating extract.
2 Regionality definitions are based on the Modified Monash Model (MMM).