Plot.plot({
marks: [
Plot.line(data, {
x: "Solar Insolation",
y: "Latitude"
}),
Plot.dot(data, {
x: "Solar Insolation",
y: "Latitude",
fill: "black"
}),
Plot.text(data, {
x: "Solar Insolation",
y: "Latitude",
text: (d) => `${d["Solar Insolation"]} kw/h`,
textAnchor: "start",
dx: 10
})
],
x: { axis: null },
y: {
ticks: data.map((d) => +d["Latitude"]),
tickFormat: (d, i) => data[i].City,
tickSize: 0
},
marginLeft: 200,
marginRight: 100,
width: 400,
height: 480
})