🌍 Public
Iterate my work - bar chart of crime in India
This bar chart shows the total number of rape cases per state in India for the year 2008, sorted in descending order. It uses D3 v7’s `scaleBand` and `scaleLinear` with SVG rendering. A `rollup` call aggregates cases by state, and an axes are drawn with `axisLeft` and `axisBottom`. Bars change opacity on hover and display the state name via a tooltip div, while a fixed year filter removes overlapping bars.
AI-generated descriptionDataset: https://gist.github.com/lzlazmSylas/6be318f1ef48498d10f831bbd78782f3#file-crimes_against_women-csv
X-axis: Number of cases
Y-axis: State
New things:
- Fix bug by filtering the "Year" column and set it to specified year. Now there is no bar staked together.
- Sort the data in descending order.
- Added hover effect to each bar in his visualization.
MIT Licensed
Comments
Sign in to join the discussion.