Iterate | Nicolas Lambert | Observable
•ojs
•ojs
•ojs
Comments (2)
Fati CHEN
Jan 3, 2023
You can also do : ```observablehq propertiesandgeom = geo.map(world, (d, i) => { const [lon, lat] = d3.geoCentroid(world.features[i]) return {id: d.CNTR_ID, name: d.CNTR_NAME, lat, lon, geoArea: d3.geoArea(world.features[i])} }) ``` instead of accessors
Nicolas Lambert
Jan 3, 2023
Thank you. It's much better this way. I add your code below.
Reply
Add comment
Subscribe to notifications
Observable
Sign in
Nicolas Lambert
11
Reply
Add comment
Subscribe to notifications
1
Iterate | Nicolas Lambert | Observable