Public
Edited
May 12, 2023
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
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
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
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
// choropleth = {
// const svg = d3.create("svg")
// .attr("viewBox", [0, 0, width, height]);
// svg.append("g")
// .attr("transform", "translate(225,20)") // Controls the position of the legend (x, y) x-left and right, y-up and down
// .append(() =>
// legend({
// color: color, // Sets the colors on the legend from our color object earlier
// title: data.title, // Sets the title of the legend using the data object we created earlier
// width: 300, // Controls the width of the legend
// tickFormat: ".1f" // Controls the decimal place of the numbers used on the legend (ie. 3.1 versus 3.112)
// })
// );
// // This function creates the legend graphics , or ("g"), while the functions within control aspects of the legend
// svg.append("g")
// .selectAll("path")
// .data(regions.features)
// .join("path")
// .attr("stroke", "Black")
// .attr("stroke-linejoin", "round")
// .attr("stroke-width", .5)
// .attr("fill", d => color(data.get(+d.properties.schluessel)))
// .attr("d", path)
// .append("title")
// .text(d => d.properties.gen + " Population Percent: " + data.get(+d.properties.schluessel));
// return svg.node();
// }
Insert cell
Insert cell
// choropleth_2 = {
// const svg = d3.create("svg")
// .attr("viewBox", [0, 0, width, height]);
// svg.append("g")
// .attr("transform", "translate(225,20)") // Controls the position of the legend (x, y) x-left and right, y-up and down
// .append(() =>
// legend({
// color: color_2, // Sets the colors on the legend from our color object earlier
// title: data_2.title, // Sets the title of the legend using the data object we created earlier
// width: 300, // Controls the width of the legend
// tickFormat: ".1f" // Controls the decimal place of the numbers used on the legend (ie. 3.1 versus 3.112)
// })
// );
// // This function creates the legend graphics , or ("g"), while the functions within control aspects of the legend
// svg.append("g")
// .selectAll("path")
// .data(regions.features)
// .join("path")
// .attr("stroke", "Black")
// .attr("stroke-linejoin", "round")
// .attr("stroke-width", .5)
// .attr("fill", d => color_2(data_2.get(+d.properties.schluessel)))
// .attr("d", path)
// .append("title")
// .text(d => d.properties.gen + " Population Percent: " + data_2.get(+d.properties.schluessel));
// return svg.node();
// }
Insert cell
Insert cell
// choropleth_3 = {
// const svg = d3.create("svg")
// .attr("viewBox", [0, 0, width, height]);
// svg.append("g")
// .attr("transform", "translate(225,20)") // Controls the position of the legend (x, y) x-left and right, y-up and down
// .append(() =>
// legend({
// color: color_3, // Sets the colors on the legend from our color object earlier
// title: data_3.title, // Sets the title of the legend using the data object we created earlier
// width: 300, // Controls the width of the legend
// tickFormat: ".1f" // Controls the decimal place of the numbers used on the legend (ie. 3.1 versus 3.112)
// })
// );
// // This function creates the legend graphics , or ("g"), while the functions within control aspects of the legend
// svg.append("g")
// .selectAll("path")
// .data(regions.features)
// .join("path")
// .attr("stroke", "Black")
// .attr("stroke-linejoin", "round")
// .attr("stroke-width", .5)
// .attr("fill", d => color_3(data_3.get(+d.properties.schluessel)))
// .attr("d", path)
// .append("title")
// .text(d => d.properties.gen + " Population Percent: " + data_3.get(+d.properties.schluessel));
// return svg.node();
// }
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