Plot.plot({color: {type: "categorical", legend: false,scheme: "Pastel1", style: {fontSize: 20}, width: 700, ticks: 7},
insetBottom: 60,
insetTop: 130,
projection: {type: "mercator",
domain: {type: "MultiPoint", coordinates: [[ 29.5684, -1.4873 ],
[ 35.0410, -1.4873 ],
[ 29.5684, 4.2372 ],
[ 35.0410, 4.2372 ]]
}
},
width: 700,
marks: [
Plot.sphere({fill: "white"}),
Plot.geo(countries, {fill: "#0e1818", opacity: 1, stroke: "#182828",}),
Plot.geo(countries, {fill: "black", opacity: 1,filter: d=> d.properties.name == "Uganda" }),
Plot.raster(watersource_uganda_all, {x: "lon_deg", y: "lat_deg", fill:"water_source", filter: d=>d.install_year <= yearinput}),
Plot.text(['Uganda'],{x:29.5684, y:4.2372 , dx: -50, dy: -30, fontSize: 70, fill: "#2f4f4f", opacity: 1, lineWidth: 26, textAnchor: "start", lineHeight: 1.4, clip: false, fontWeight: "bold" }),
Plot.text(watersource_uganda_all.slice(0,1), {x:29.5684, y:4.2372 , dx: 390, dy: -80, fontSize: 30, fill: "#2f4f4f", opacity: 1, lineWidth: 26, textAnchor: "start", lineHeight: 1.4, clip: false, text: d=>yearinput.toString()}),
Plot.text(['Reported water source locations, '],{x:29.5684, y:4.2372 , dx: -50, dy: -80, fontSize: 30, fill: "#2f4f4f", opacity: 1, lineWidth: 26, textAnchor: "start", lineHeight: 1.4, clip: false }),
Plot.text(['Data.waterpointdata.org | Design: Deepsha Menghani | Threads: IandLoveandData | Mastodon: Deepsha'],{x:35.0410, y:-1.4873, dx:90, dy: 30, fontSize: 15, fill: "#008080", opacity: 1, textAnchor: "end", lineHeight: 1.2, clip: false, fontStyle: "italic"})
],
})