Plot.plot({
width: 700,
height: 800,
projection: { type: "mercator", domain: nycBoroughs },
color: {
legend: true,
label: "Mean Income",
range: ["yellow", "blue"],
interpolate: "hcl"
},
marks: [
Plot.geo(nycBoroughs, { stroke: "black", strokeOpacity: 0.4 }),
Plot.geo(nycShoreline, { stroke: "blue", strokeOpacity: 0.1 }),
Plot.dot(nyc_census_income.features, {
x: "INTPTLON10",
y: "INTPTLAT10",
r: "MultiPolygon",
fill: (d) => parseFloat(d.MultiPolygon)
}),
Plot.geo(nyc_census_income.features, {stroke:"grey", strokeOpacity: 0.5, fill: d => d.properties.MeanHHInco}),
]})