requesting help to render map back into SVG/canvas/container

I am trying to port ‘Asia Map’ by Daniel from bl.ock ff8448ace9d5d567390a to Observable.

I have tried porting both with different bits of the code segmented:

…as well as playing with the full code block:

I have tried variations on

var svg = d3.select(DOM.element('svg'))
	.attr("width", width)
	.attr("height", height);

return svg.node();
const context = DOM.context2d(width, height);
return context.canvas;

and

let container = DOM.element('div', { style: `width:${width}px;height:${width/1.6}px` });
return container

I (again) appeal to the community for help :pray:

And sorry that this is something of a repeated question. Slowly taking this all in.

Hi aaron,
I removed the heroku CORS, since the source is a gist and moved the subunit var to a seperate cell (just to keep it consistent) and the svg works. I didn’t try to get it to work with context2d.

You can also do DOM.svg(width, height) to get something a little shorter.

Thank you @bchoatejr and @j-f1! The heroku cors was a mistaken hold-over. I initially had found an incorrect asia.json source, and had just left this in after eventually finding the author’s original gist.

Thank you for your kind help and patience!