Skip to main content
100%

second

✓ Published1🌍 Public
119h61a05c9@cvsr.ac.in
Last edited Nov 10, 2025
Created on Nov 10, 2025
Forked from second

An interactive hierarchical tree visualization displays world population data organized by continent, country, and city, with color-coded nodes indicating each level. Hovering over city nodes reveals population details through a tooltip. The visualization uses D3.js version 7 with the `d3.hierarchy` and `d3.tree` layouts, `d3.linkVertical` for edges, and SVG rendering. It loads data from a CSV URL via `d3.csv` with fallback to embedded sample data, and includes validation and error handling.

AI-generated description

World Population Tree

An interactive hierarchical visualization of world population data organized by Continent → Country → City.

Features

  • Hierarchical Tree Visualization: Display data in a three-level tree structure
  • Color-Coded Levels: Different colors for each hierarchy level
  • Interactive Tooltips: Hover over cities to see detailed population information
  • Responsive Design: Clean, modern UI with smooth interactions
  • Error Handling: Graceful fallback to sample data if CSV fails to load

Project Structure

  • index.html - Main HTML file with styling and layout
  • tree.js - D3.js visualization logic and data processing
  • data.js - Data source configuration
  • README.md - Documentation (this file)

Data Format

The visualization expects data in CSV format with the following columns:

Column Type Description
Continent String Continental region
Country String Country name
City String City name
Population Number City population

Example CSV

MIT Licensed

Similar vizzes