Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Military spending

Public visualization

Viewing a saved revision (read-only)

1eee1b77b57c43b483d2ff49320e5120

Military spending

0 stars1🌍 Public
KKinjal-Goyani
Last edited Nov 29, 2022
Created on Nov 23, 2022

This chart visualizes military spending from 2001-2020 for major countries. Each colored line represents a country, with the x-axis showing time and the y-axis showing spending in US dollars. The visualization orders the lines by each country's final spending value to make comparisons easier. Built with D3 v5, the code uses `scaleTime`, `scaleLinear`, `scaleOrdinal`, `axisBottom`, `axisLeft`, and `line` to construct the SVG rendering. The data comes from a CSV file, and a color legend is rendered using a custom `colorLegend` function.

AI-generated description