Project_Task
✓ Published0🌍 Public
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 descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed