Sweden Population Visualization

Sweden Population Visualization

Sorry about the painful navigation above. I wasn't sure what the best way to embed it would be.

How to read this

This shows the population change in Sweden from 1749 to (as of this writing) 2015 according to Statistika Centralbyrån.

There are 3 different locations represented:

  • the world (excluding Sweden)
  • Sweden
  • Yggdrasil

Every pixel in Sweden represents a fixed number of people. As time progresses and Sweden's population grows, the size of the Sweden graphic changes to reflect the population.

There are 4 possible changes to the population, each one shown with a different graphic:

  • Births are represented by a circle travelling from Yggdrasil to Sweden
  • Deaths are represented by a circle travelling from Sweden to Yggdrasil
  • Immigrants (those coming in to Sweden) are represented by a circle travelling from the world into Sweden
  • Emigrants (those travelling out of Sweden) are represented by a circle travelling from Sweden to the world

The circles are on the same scale as the Sweden graphic, so 1 pixel in the circles represents the same number of people as 1 pixel in the Sweden graphic.

Note: the circles take transparency into account, so a transparent circle represents more people than an opaque circle. (Think of it as the people being more spread out when it's transparent.)

How to use this

Clicking within the graphic will increment it by one year.

Additionally, viewing the standalone link shows a few more controls at the bottom:

  • The "Base Year" is the year to start the animation on; you can skip around 😃
  • The "Animation Speed" is how long it takes the circles to travel from the source to the destination

Just the data

If you just want to see the underlying data in graph form, click here.

How I made this

I coded this primarily using the d3 javascript library.


I've put this code up on github. Feel free to contact me there with any technical questions.


For a full list of references, see the github reference file.