Country Map with d3.js
This example displays a world map using D3.js, coloring individual countries based on sample population data. It shows a Mercator projection of the globe, with the United States and China shaded according to the provided values. The visualization constructs the map by appending SVG paths from GeoJSON data to the chart. It relies on D3 APIs including `d3.geoMercator`, `d3.geoPath`, `d3.json`, `d3.scaleLinear`, and `d3.extent` to handle the projection, rendering, and color encoding, with a domain from data values mapped to a light-to-dark color range.