Export Image

aviii5

0 views in last 90 days
Last edited Nov 10, 2025
Created on Nov 10, 2025
Forked from D3 Starter

World Automobile Metrics Map (2024)

An interactive D3.js world map visualization of automobile metrics including total vehicles, EV sales, and average car prices by country.

Features

  • Interactive Map: Hover over countries to see detailed metrics
  • Toggle Visualization: Switch between coloring by Total Vehicles or EV Sales
  • Circle Visualization: Circle size represents EV Sales, color represents Average Car Price
  • Responsive Design: Adapts to different screen sizes
  • Legend: Dynamic legend updates based on selected metric

Data

The visualization includes data for 10 major automotive markets (USA, China, Japan, Germany, UK, France, India, Brazil, Mexico, South Korea).

To use your own CSV data:

  1. Update the INLINE_CSV variable in the script or
  2. Set DATA_URL to point to your hosted CSV file

Technologies

  • D3.js v7
  • TopoJSON for geographic data
  • world-atlas (countries-110m.json)

How to Use

  1. Open index.html in a browser
  2. Hover over countries to see metrics
  3. Click buttons to toggle color scheme between Total Vehicles and EV Sales
MIT Licensed