Fork of GeoVisualization - Choropleth map of the world
✓ Published0🌍 Public
PPedram
Last edited Jan 11, 2023
Created on Jan 11, 2023
Forked from GeoVisualization - Choropleth map of the world
This example displays a choropleth map of the world, rendering country boundaries as gray paths on an SVG. When the user hovers over a country, its fill changes to red, and it reverts to gray on mouseout. The code loads GeoJSON data from a GitHub repository using `d3.json` and applies the `d3.geoEqualEarth` projection with `projection.fitExtent` to fit the map to the viewport. It uses `d3.geoPath` to generate the path data for each feature, with the SVG sized dynamically based on the window dimensions.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed