bars = (g, x, y, data) => g
.attr("fill", "steelblue")
.selectAll("rect")
.data(data, d => d.municipality)
.join("rect")
.attr("x", (d) => x(d.rank))
.attr("y", (d) => y(d.population))
.attr("height", d => y(0) - y(d.population))
.attr("width", x.bandwidth())
.append("title")
.text(d => `${d.municipality}: Population ${format(d.population)}`)