Skip to main content
100%

d3-composite-projections test

✓ Published0🌍 Public
LLuisSevillano
Last edited Aug 14, 2019
Created on Aug 13, 2019

This example demonstrates an interactive map of Spain’s autonomous regions using the d3-composite-projections library to combine separate projections into a single visualization. It loads preprojected TopoJSON data from the es-atlas package and renders boundaries with `d3.geoPath`, while a dashed brown overlay marks the composite projection’s internal borders. As the user moves the mouse, the code uses `projection.invert` to display geographic coordinates and appends fading circles at each cursor position, using SVG transitions to shrink them. Points outside the valid projection area trigger an error message instead of drawing.

AI-generated description

Test with d3-composite-projection and preprojected TopoJSON

Similar vizzes