t = Plot.plot({
height: 500,
width: 700,
marginTop: 10,
marginBottom: 50,
title: "More trees, cooler surface temperatures",
subtitle: "Difference in Block Group's extreme surface temperature relative to the urban average",
color: {
legend: false,
height: 50
},
x: {
grid: true,
label: "Tree Canopy %",
domain: [0, 100]
},
y: {
grid: true,
label: "",
domain: [-10, 24]
},
marks: [
Plot.ruleY([0], {
stroke: "grey"
}),
Plot.dot(bridgeportData, {
x: "TREECANOPY",
y: "TEMP_DIFF",
r: 6,
stroke: "black",
opacity: 0.14
}),
Plot.dot(bridgeportData, {
x: "TREECANOPY",
y: "TEMP_DIFF",
r: 4,
stroke: "white",
fill: "TEMP_DIFF"
}),
Plot.linearRegressionY(bridgeportData, {
x: "TREECANOPY",
y: "TEMP_DIFF",
stroke: "grey",
fillOpacity: 0.05
})
]
})