The D3.js code that I used as the base for the Life Expectancy New Year's card that I designed. You can see the end result of all 4 cards and read about the design process in my blog Saying "Happy new year" with data
You can find the design of the two other cards here
https://d3js.org/d3.v3.min.js