Unlisted
Edited
Apr 24
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
initBarChartOverview = new makeGroupedBarChart(
datagroupedbarchartoverview,
metagroupedbarchartoverview,
chartgroupedbarchartoverview,
"groupedbarchartcontaineroverview",
groupedbarchartfilterViewOverview,
viewof groupedbarchartfilterViewOverview,
{} //optional options
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
datamap = {
let rawdata = d3
.json(basicapi.url + "/files/bezirksstatistik_aufnahmepruefung_map")
.then(function (data) {
data.data = data.data.filter((d) => d.jahr <= maxyear);
return data;
});
return rawdata;
}
Insert cell
datagroupedbarchart = {
let rawdata = d3
.json(basicapi.url + "/files/bezirksstatistik_aufnahmepruefung_groupedbar")
.then(function (data) {
data.data = data.data.filter((d) => d.jahr <= maxyear);
return data;
});
return rawdata;
}
Insert cell
//used to filter out empty groups for BM2
datagroupedbarchartfiltered = datagroupedbarchart.data.filter((d) =>
groupedbarchartfilterView.mittelschultyp ==
"Berufsmaturität nach der Berufslehre (BM2)"
? d.Indikator == "Anteil Bestanden/ Geprüft"
: d
)
Insert cell
Insert cell
chartgroupedbarchartoverview = ({
charttype: "groupedbar",
groupscolumn: "mittelschultyp",
subgroupscolumn: "Indikator",
valuescolumn: "Anteil",
ordergroupsby: {},
fullscreen: true,
embed: true,
downloadpng: true,
downloadsvg: true,
downloadxlsxall: true,
downloadxlsx: true,
downloadcsvall: true,
downloadcsv: true
})
Insert cell
metagroupedbarchartoverview = ({
title:
"Anteilsvergleich Zentrale Aufnahmeprüfung " +
groupedbarchartfilterViewOverview.jahr,
titleHide: false,
subtitle: "nach Maturitätsschultyp",
subtitleHide: false,
descriptionTop: "",
descriptionTopHide: false,
description:
"<p><i>ZAP</i>: Wer eine Mittelschule oder eine Ber…nge beim Übertritt fehlt eine Referenzgrösse.</p>",
descriptionHide: true,
source: "Mittelschul- und Berufsbildungsamt",
statusDate: "2023-04-25 08:00:00",
columns: [
{
columnKey: "jahr",
columnName: "Schuljahr",
type: "year",
order: 0,
display: true,
filter: true,
responsivePriority: 0
},
{
columnKey: "mittelschultyp",
columnName: "Mittelschultyp",
type: "string",
order: 1,
display: true,
filter: false,
responsivePriority: 0
},
{
columnKey: "Bezirk",
columnName: "Bezirk",
type: "string",
order: 2,
display: false,
filter: false,
responsivePriority: 0
},
{
columnKey: "Indikator",
columnName: "Indikator",
type: "string",
order: 3,
display: true,
filter: false,
responsivePriority: 0
},
{
columnKey: "Anteil",
columnName: "Anteil",
type: "percent",
order: 4,
display: true,
filter: false,
responsivePriority: 0
}
]
})
Insert cell
datatable = {
let rawdata = d3
.json(basicapi.url + "/files/bezirksstatistik_aufnahmepruefung_table")
.then(function (data) {
data.data = data.data.filter((d) => d.jahr <= maxyear);
return data;
});
return rawdata;
}
Insert cell
datatableoverview = {
let rawdata = d3
.json(
basicapi.url + "/files/bezirksstatistik_aufnahmepruefung_table_overview"
)
.then(function (data) {
data.data = data.data.filter((d) => d.jahr <= maxyear);
return data;
});
return rawdata;
}
Insert cell
Insert cell
//import { legend, swatches, Swatches } from "@d3/color-legend"
Insert cell
import { makeDataTable } from "@bildungsplanungzh/tabelle"
Insert cell
import { makeMap } from "@bildungsplanungzh/prototyp-karte"
Insert cell
import { makeMapLine } from "@bildungsplanungzh/prototyp-karte-mit-linechart"
Insert cell
import { makeGroupedBarChart } from "@bildungsplanungzh/prototyp-grouped-bar-chart"
Insert cell
import { graphicsColors, basicapi } from "@bildungsplanungzh/general"
Insert cell
Insert cell
Insert cell
Insert cell
import { InputsLeuSelect } from "@bildungsplanungzh/leuselect"
Insert cell
Insert cell
maxyear = {
if (SearchParams.maxyear !== undefined) {
return SearchParams.maxyear;
} else return "2024/25";
}
Insert cell
initialyear = {
if (SearchParams.initialyear !== undefined) {
return SearchParams.initialyear;
} else return d3.min([d3.max(distincts(datamap.data, "jahr")), maxyear]);
}
Insert cell
SearchParams = Object.fromEntries(new URLSearchParams(location.search))
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more