chart = {
const width = 1000,
height = 1200;
const svg = d3.create("svg")
.attr("viewBox", [50, 50, width-80, height-100]);
var projection = d3
.geoMercator()
.fitSize([width - 50, height - 50], mapBoundaries);
var path1 = d3.geoPath().projection(projection);
var path2 = d3.geoPath().projection(projection);
var path3 = d3.geoPath().projection(projection);
var g = svg.append("g").attr("id", "paths");
g.selectAll("path2")
.data(subLns.features)
.enter()
.append("path")
.attr('class','outlines')
.attr("d", path2)
.style("fill", "none")
.style('stroke-opacity','1')
.style("stroke-width", '.75')
.style("stroke", "rgb(0,0,0)")
g.selectAll("path3")
.data(worldMap.features)
.enter()
.append("path")
.attr('class','outlines')
.attr("d", path3)
.style("fill", "rgb(120,108,240)")
.style("fill-opacity", ".5")
.style('stroke-opacity','.4')
.style("stroke-width", '.5')
.style("stroke", "rgb(0,0,0)")
var cir = svg.selectAll("circle")
.data(datapoints)
.enter()
.append("circle")
.attr("r", "3")
.attr("cx", function(d) {return projection([d.Long,d.Lat])[0]})
.attr("cy", function(d) {return projection([d.Long,d.Lat])[1]})
.style("fill", "red")
.style("fill-opacity", "1")
.style('stroke-opacity','.4')
.style("stroke-width", '.5')
.style("stroke", "rgb(0,0,0)")
var p = svg.selectAll("polyline")
.data(line)
.enter()
.append("polyline")
.attr('points', function(d){return d})
.style("fill", "red")
.style("fill-opacity", "0")
.style('stroke-opacity','1')
.style("stroke-width", '1')
.style("stroke", "rgb(0,0,0)")
return svg.node();
}