Skip to main content
100%

Project_Task

✓ Published0🌍 Public
Pparvathi829790@gmail.com
Last edited Apr 26, 2024
Created on Apr 22, 2024

This example compares the highest salaries by company location before and after the COVID-19 pandemic, using a dataset of data science salaries loaded via `d3.csv`. Two horizontal bar charts are rendered side-by-side in an SVG, with the top chart covering 2020–2022 and the bottom chart covering 2023–2024. The code uses `d3.rollup` to compute maximum salaries per location, then sorts and slices the top 20 locations, applying `d3.scaleBand` and `d3.scaleLinear` with `d3.axisLeft` and `d3.axisBottom`. The charts are built with D3 v6, with hover styling applied to the bars.

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