Bar Chart of Character Alignment
This bar chart displays the count of Marvel characters for each alignment category—good, bad, and neutral—using color to denote the alignment (green, dark red, and grey). It summarizes the distribution from a CSV dataset of character alignments. The visualization is built with D3 v5, using `scaleLinear` and `scaleBand` for axes, and a custom `colorPicker` function to fill rectangles based on each alignment value. It renders as an SVG, pulling data from a GitHub gist and counting occurrences via a JavaScript object.
AI-generated descriptionBar chart of character alignment counts, colored by alignment for pratice of function based coloring.
Data from: https://gist.github.com/LeahMitchell/8ad46fbcac8d7420bcd5b97b1a245f43
References:
Stack overflow link for coutning alignment https://stackoverflow.com/questions/38296484/count-text-fields-from-csv-dataset-in-d3-js