block by martgnz 1dac26402e62944df89601fa73defbb2

Spanish Bubbles

Full Screen

This is the Spanish version of Mike Bostock’s County Bubbles made with Canvas and Spam.

Each town is a bubble, which is sized according to its population.

The data comes from a CSV which contains the latitude and longitude for each town. Then, a d3.scale.sqrt is passed to encode the population: the radius of the circle is proportional to the square root of the population.

I’m using d3-queue to simplify the code and handle multiple requests easily.

index.html