Recreating a stacked bar chart
January 29, 2025This week I recreated a stacked bar chart from The New York Times on racial disparity in health care in the United States. Gus Wezerek participated in its creation.
Warning: Data may be inaccurate compared to the source.Recreation
Highlights
One more stacked bar chart for the challenge. It was a recreation that I enjoyed doing because of the style of the chart and the challenges it brought with it.
- I still find it a challenge to create patterns with SVG. Sometimes I succeed on the first try and at other times I'm unable to make a simple line. Sometimes I try to add more space or separate lines and the pattern is completely damaged. Even if I haven't used it, I found this resource that might help me in the future. The most important thing: we keep learning
- I have found that I feel more comfortable adjusting the style of the axes, being able to use .ticks and .domain to make specific adjustments, plus the ability to use D3 for filtering, we have a lot of control. In the beginning, I was going crazy figuring out how to remove a simple tick, a "line" that I didn't understand.
- This style used in the article by Gus Wezerek led me to make a decision: I'll use it to participate in #The100DayProject. For 100 days, I'll use this style to create 100 charts. I was previously inclined to do it with maps, but I feel I have too little experience to be consistent for so many days, and although I have the thirst to learn, I also have other projects and responsibilities. Don't miss the opportunity to check out the other charts in the article.