making a projection plot in observable using topojson file

I’m trying to make a choropleth map with observable with my topojson file. I’ve loaded as an example shown in this website but the map doesn’t show up.
My topojson file has properties as below

seoul = Object {
type: “Topology”
objects: Object {
Seoul_Gu: Object {
type: “GeometryCollection”
geometries: Array(25) [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, …]
}
}
arcs: Array(131) [Array(2), Array(5), Array(5), Array(9), Array(2), Array(7), Array(3), Array(5), Array(5), Array(71), Array(10), Array(2), Array(7), Array(4), Array(3), Array(2), Array(2), Array(3), Array(2), Array(3), …]
bbox: Array(4) [126.767, 37.428, 127.183, 37.701]
transform: Object {scale: Array(2), translate: Array(2)}
}

It seems no problem in the topojson file.
When I change my topojson file to the one in the example file, the code works well.
How can I fix this problem?

Hi @SYLim, please share a link to your notebook.

https://observablehq.com/d/672920aeb41572d3

Thanks for your help!

You can try this:

Plot.plot({
  projection: { type: "mercator", domain: gu },
  marks: [Plot.geo(gu, { stroke: "black" })]
})

Details: Projections | Observable Plot

Now I got the map! Thank you!!

1 Like