Skip to main content
100%

Fork of Spinning Globe with capitals

✓ Published0🌍 Public
MMuhammadsaad.khan@vuw.ac.nz
Last edited May 29, 2024
Created on May 29, 2024

This visualization displays a rotating orthographic globe with capital cities and COVID-19 case data colored on countries. The globe automatically spins via `d3.timer` while supporting drag interaction through `d3.drag`. It uses `d3.geoOrthographic` with `geoPath` to render country boundaries, graticule lines, the equator, and Greenwich meridian. Radial gradients applied through SVG definitions create a night-side effect on the sphere. City points are sized by population using `geoPath`’s `pointRadius` method, and COVID-19 data is loaded from a CSV file.

AI-generated description

A spinning globe with capital cities.

Initially, I just wanted to change the rotation, and add the equator. Then I realized that the graticule lines are clipping as expected, so tried to add the capital cities too in the same manner (see the SO link below that helped me to achieve that). And I could not resist to have some fun with gradient coloring. The 'defaultProjection' and the gradient values are tuned for this "small" VizHub view and use 'userSpaceOnUse' for gradientUnits (for various reasons :) ... yeah, I don't know much about this, and I was satisfied with the current result.)

See also:

MIT Licensed

Similar vizzes