Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_question3

Public visualization

Viewing a saved revision (read-only)

4f612f9eec2142e6a3063c408facdc33

Activity6_question3

0 stars0🌍 Public
PPreethi Medepalli-91
Last edited Oct 22, 2024
Created on Oct 22, 2024
Forked from Activity6_task3

This scatter plot visualizes the cities dataset, showing each city as a circle positioned by its area (x-axis) and population (y-axis), with colors indicating the region. It uses D3 v6 APIs including `csv`, `scaleLinear`, `axisLeft`, and `axisBottom` to load data from a GitHub CSV URL and render an SVG chart. The code sets fixed dimensions, applies margins, and uses a switch statement to assign distinct colors to North America, South America, Europe, Asia, and Africa, while smaller tick labels improve readability.

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.