// .map(d => (d.value = Math.sqrt(d.properties[attributeName]), d)) // Calculate radius value
// .sort((a, b) => b.value - a.value)) // Sort by value for better layering
// .join("circle")
// .attr("transform", d => `translate(${path_floodplain.centroid(d)})`)
// .attr("r", d => radius(d.value)) // Circle size based on value
// .attr("fill", d => colors(d.value)) // Color based on value
// .attr("fill-opacity", 1) // Opacity
// .attr("stroke", "#bdbdbd") // Outline of the dots
// .attr("stroke-width", 0.5) // Outline width
// .append("title")
// .text(d => `${d.properties[building_type]} | ${d.properties[idName]} | ${format(d.properties[attributeName])} mm`);
// // 4. Title
// svg.append("text")
// .attr("x", 450)
// .attr("y", -25)
// .attr("text-anchor", "middle")
// .attr("font-size", "30px")
// .attr("font-weight", "bold")
// .text("Different Facilities at Flood Risk");
// // 5. Subtitle
// svg.append("text")
// .attr("x", 450)
// .attr("y", -5)
// .attr("text-anchor", "middle")
// .attr("font-size", 16)
// .attr("font-style", "italic")
// .text("Johnson County, Iowa");
// // 6. Data Source Text
// svg.append("text")
// .attr("x", 400)
// .attr("y", 200)
// .attr("text-anchor", "middle")
// .attr("font-size", 12)
// .attr("font-style", "italic")
// .text("Data: Census 2019 - 2023, FEMA Geospatial Resource Center and Iowa Geospatial Data Clearinghouse")
// .attr("transform", "translate(-140, 350)");
// // 7. Legend (Optional, you can enhance this)
// const legend = svg.append("g")
// .attr("transform", `translate(${width - 900}, 380)`);
// // Legend title
// legend.append("text")
// .attr("y", -20)
// .attr("text-anchor", "middle")
// .attr("font-size", 16)
// .text("Flood Depth (mm)");
// // Legend circles
// legend.selectAll("circle")
// .data(quantileBreaks)
// .join("circle")
// .attr("cy", (d, i) => i * 40)
// .attr("r", d => radius(d))
// .attr("fill", (d, i) => YlOrRd[i]);
// // Legend labels
// legend.selectAll("text.label")
// .data(quantileBreaks)
// .join("text")
// .attr("class", "label")
// .attr("x", 30)
// .attr("y", (d, i) => i * 40 + 5)
// .text(d => format(d, 2));
// return svg.node();
// // }