{
const container = d3.create("svg")
.attr("height", h + margin.top + margin.bottom)
.attr("width", width)
const chart = container.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")")
chart.append("text")
.text("Not finished! Still need to figure out how to merge the data from different years into one object to draw the lines correctly")
.style("font-size", "15px")
.style("font-weight", "bold")
.attr("fill", "red")
.attr("transform", "translate(-10, 10)")
chart.append("g")
.attr("transform", "translate(0," + h + ")")
.call(d3.axisBottom(xScale))
.selectAll("text")
.attr("transform", "translate(-10,0)rotate(-45)")
.attr("text-anchor", "end")
chart.append("g")
.call(d3.axisLeft(yScale))
chart.selectAll("myline")
.data((gapminder1955, gapminder2005))
.enter()
.append("line")
.attr("x1", (d => (d.year === 2005) ? xScale(d.pop) : 0))
.attr("x2", (d => (d.year === 1955) ? xScale(d.pop) : 0))
.attr("y1", d => yScale(d.country))
.attr("y2", d => yScale(d.country))
.attr("stroke", "grey")
chart.append("g")
.selectAll("mycircle")
.data(gapminder1955)
.enter()
.append("circle")
.attr("cx", d => xScale(d.pop))
.attr("cy", d => yScale(d.country))
.attr("r", 4)
.attr("fill", "cadetblue")
chart.append("g")
.selectAll("mycircle")
.data(gapminder2005)
.enter()
.append("circle")
.attr("cx", d => xScale(d.pop))
.attr("cy", d => yScale(d.country))
.attr("r", 4)
.attr("fill", "pink")
return container.node()
}