Public
Edited
Jan 23, 2024
Insert cell
Insert cell
Insert cell
Insert cell
thumbnail_daemon = navigator.userAgent.match("HeadlessChrome")
Insert cell
Insert cell
visualise = async container => {
const visualiser = await new Highcharts.Visualiser(
container,
options
).build();
container.replaceChildren(visualiser.element);
return visualiser;
}
Insert cell
Insert cell
data = Data.buildMeasureMap(WorkforceData.sizeByMonthForCalendarYear.months, [
{ id: "newHires" },
{ id: "rehires" },
{
id: "rehireRatio",
source: row => (row.rehires ? row.newHires / row.rehires : 0)
}
])
Insert cell
Insert cell
options = ({
chart: { animation: false, reflow: false, style: { fontSize: "1em" } },
legend: {
itemStyle: { fontSize: "0.875em", fontWeight: "normal" },
symbolRadius: 0
},
plotOptions: { series: { animation: false, stacking: "normal" } },
series: [
{
borderColor: "#66BB6A",
color: "#C8E6C9",
data: data.newHires,
name: "New Hires",
type: "column"
},
{
borderColor: "#E7C000",
color: "#FFF7D4",
data: data.rehires,
name: "Rehires",
type: "column"
},
{
color: "#78909C",
data: data.rehireRatio,
name: "Rehire Ratio",
type: "line",
yAxis: 1
}
],
title: {
style: { fontSize: "1.125em" },
text: `Hires by Month for ${WorkforceData.sizeByMonthForCalendarYear.year}`
},
xAxis: [
{
categories: Data.monthAbbreviations,
labels: { style: { fontSize: "0.875em" } }
}
],
yAxis: [
{
labels: { format: "{value:,.0f}", style: { fontSize: "0.875em" } },
reversedStacks: false,
title: { text: "Hires" }
},
{
labels: { format: "{value:,.0f}", style: { fontSize: "0.875em" } },
opposite: true,
title: { text: "Ratio" }
}
]
})
Insert cell
Insert cell
embedded = false
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more