Skip to main content
100%

Activity6_Question3

✓ Published0🌍 Public
KKhushi Desai
Last edited Oct 20, 2024
Created on Oct 20, 2024
Forked from Activity6_Task3

This scatter plot visualizes city data, mapping population on the x-axis against area on the y-axis, with each point colored by region using a categorical color scale. The code loads a CSV file from GitHub, parses it, and renders circles in an SVG using D3 v6 APIs such as `csv`, `scaleLinear`, `scaleOrdinal`, `axisLeft`, `axisBottom`, and `entries`. A legend, built with appended rectangles and text, identifies the region colors. The visualization uses the browser’s full window dimensions and positions axes with margin conventions.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes