task_4_solution = {
const width = 800;
const height = 600;
const projection = d3.geoMercator()
.translate([width/2, height/2])
.scale(100);
const svg = d3.select(DOM.svg(width, height));
svg.selectAll("path")
.data(mapData.features)
.enter().append("path")
.attr("fill", 'rgb(230, 230, 230)')
.attr("stroke", 'rgb(200, 200, 200)')
.attr("d", d3.geoPath(projection));
const fLongitudePixelLen = (76/100)*(width/2)/180;
const fLatitudePixelLen = (59/100)*(height/2)/90;
const fCenterX=width/2;
const fCenterY=height/2;
svg.selectAll('circle')
.data(data)
.enter()
.append('circle')
.attr('cx', d => fCenterX+ (d.longitude*fLongitudePixelLen))
.attr('cy', d => fCenterY - (d.latitude*fLatitudePixelLen))
.attr('r', d=> d.percentage_green_area * (width/5000))
.attr('fill', '#a7d4b6');
return svg.node();
}