Recreating a area chart
February 05, 2025This week I recreated a area chart from The New York Times on the United States and its carbon pollution. Justin Gillis and Nadja Popovich participated in its creation.
Warning: Data may be inaccurate compared to the source.Recreation
Developed economies
Other countries
Highlights
This is the first area chart of this year, one that represents a challenge. I wasn't entirely happy with the result, but the goal was achieved, and most importantly, there was a lot of learning.
- It's one of the first recreations I think of: they don't look much alike. The reason is the data. When I have access to the data, I use it, when I can replicate it, I do it, but in this recreation, I had to add year by year, and being more than 164 years I had to do and do it six times for each graph, I chose to simplify the data.
- It's one of the first recreations where I created several charts using forEach() and customizing them using the index of each one. Beyond the data and the base structure, each chart has different elements and I used conditional logic to make what I wanted to appear or disappear.