x_domain = d3.range(1, 5.1, 0.1).map(d => parseFloat(d.toFixed(1)));
barchart = Plot.barY(start_values, {
x: (d, i) => 1+i/10,
fill: (d, i) => ((i-20)/20),
y: (d) => d,
render: (i, s, v, d, c, next) => {
const g = next(i, s, v, d, c);
c.ownerSVGElement.update = (values) =>
d3
.select(g)
.selectAll("rect")
.transition()
.duration(750)
.attr("height", (i) => s.y(0) - s.y(values[i]))
.attr("y", (i) => s.y(values[i]));
return g;
}
}).plot({
y: { domain: [0, 0.15],
tickFormat: (d) => `${(d * 100).toFixed(0)}%`,
label: "Proportion of Ratings"},
x: { ticks: [1, 2, 3, 4, 5],
domain: x_domain,
label: "Unrounded Overall Star Rating"},
color: { scheme: "RdYlGn", domain: [-1, 1] }
})
data = d3.csv("stars-vis.csv", d => ({
quarter: d.quarter,
value: +d.value,
n: +d.n
}));
start_values = data.filter(row => row.quarter === index_names[0]).map(row => row.n);
{
let index=0;
do {
d3.select("#plot-heading").text(`Australian Aged Care Star Ratings From ${index_names[index]}`);
d3.select("#plot-heading2").text(`${plot2_stat[index]} of homes had a rating of four or five stars in ${index_names[index]}`);
const newValues = data.filter(row => row.quarter === index_names[index]).map(x => x.n);
barchart.update(newValues).end();
barchart2.update(newValues).end();
await Promises.delay(1200);
index+=1;
if(index==1) {
await Promises.delay(1000);
}
if(index>6) {
await Promises.delay(1000);
index=0;
}
} while (true);
}Visualising Aged Care Star Ratings up to Q4 FY23-24
The latest Australian aged care star ratings have continued the upward trend. Below I show two animated histograms highlighting how star ratings have changed over time until Q4 FY23-24. The metric considered is the “unrounded overall star rating”. The overall star rating is a weighted average of the ratings in each category, which is then rounded. I simply don’t perform the final rounding step.
A summary of the current number of each star rating awarded is shown in Table 1.
Star Rating
|
||||
|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 |
| Overall | ||||
| 0.0% (0) | 0.1% (3) | 30.7% (753) | 65.5% (1607) | 3.7% (92) |
| Residents' Experience | ||||
| 0.0% (1) | 2.8% (70) | 49.8% (1230) | 42.1% (1039) | 5.2% (128) |
| Compliance | ||||
| 0.0% (0) | 0.1% (2) | 3.3% (83) | 36.8% (919) | 59.7% (1490) |
| Quality Measures | ||||
| 3.6% (89) | 7.0% (175) | 43.0% (1073) | 23.6% (589) | 22.8% (569) |
| Staffing | ||||
| 4.4% (110) | 27.0% (675) | 42.6% (1063) | 13.2% (329) | 12.8% (320) |
There has been a consistent increase in average star ratings since they were introduced in all categories other than quality measures, as seen in Figure 1.
Treating the star ratings as purely categorical, we still observe a convincing trend in Figure 2. The number of four and five star ratings have increased while the number of one, two, and three star ratings have decreased.