In this page, it shows two maps. The first is population density in USA. The second is world population in every country.
The key to create this map is adding legend and interaction. Interaction is added through mapbox-gl.js. Legend is using css.
This map shows the population in 2015. Most of work is done using Mapbox style except the legend. Legend is created using css. I downloaded this data from another guy. However, I think this data is violated with commen sense. The numbers are inaccurate.