This animated visualization displays six stars—Earth, Mira, Antares, Betelgeuse, Rigel, and Deneb—with their relative sizes scaled proportionally while distances are normalized for visibility. Each star is rendered as a circle with a distinct fill color, and labels fade in sequentially above each body. The code uses D3’s `select`, `transition`, and `easeLinear` APIs to animate circle radii and positions, with data sourced from a Kaggle dataset of star properties. The animation runs on an SVG canvas with a black background, smoothly expanding each circle and fading in its name.
AI-generated descriptionA visualization of various stars from earth. Relative sizes to scale, distances not to scale. I tried to visualize stars as seen from our earth. I normalized the distances and radius of each star to each other.
Data from (https://www.kaggle.com/datasets/waqi786/stars-dataset).
Challenge
- Option A: Use this template to visualize the relative size of various numbers.
- Option B: Add SVG Gradients to make the planets look more planet-like
Comments
Sign in to join the discussion.