Recreating a stacked area chart
Octuber 23, 2024This week I recreated a stacked area chart from the New York Times on the percentage of people living below each poverty line worldwide from 1981 to 2024. Sara Chodosh participated in its creation.
Warning: Data may be inaccurate compared to the source.Recreation
Highlights
I had never made a stacked area chart before. What I had done before was a stacked bar chart, which made it easier for me to understand what to do.
- I feel more comfortable creating functions, methods, or variables that I can use over and over again, whether to modify several elements or move a specific one. I never thought I would use forEach() so much.
- This is the first recreation where I "failed" to extract the data. In the previous ones, I just downloaded or transcribed it. And although the source was available, I didn't know how to get it. At first, I thought "I will try to recreate it by looking at it” and then I changed my mind because, in a stacked area chart, any adjustment will change the whole chart. I was doing it for a while until I was "happy" with the result.