office_coords = d3.csvParse(await FileAttachment("WHD_Offices.csv").text())
.map(obj => {
let proj = projection([obj.lon, obj.lat])
return {
name: obj.name,
lat: parseFloat(obj.lat),
lon: parseFloat(obj.lon),
x: proj ? proj[0] : -1,
y: proj ? proj[1] : -1,
}
})
.filter(obj => obj.x > -1 && obj.y > -1)