GE2020: Live visualization

By Chi-Loong Chan | | Visualization

(Live interactive visualization is at

Since we did a visualization of the last GE2015 elections and it was quite a fun project then, I decided to do one again for GE2020 this time.

This elections just concluded July 10th / 11th – about a week and a half ago.

Even though the media of course did live visualizations (including a gorgeous one by Straits Times), I’ve always believed that there are different ways of looking at the data and curating it.

One of the main things I wanted to do, was allow the end user to really have an interactive map base that they could pan and zoom, and to find out where their districts were.

I also wanted to make sure that when you toggled between the years, the animation tweening between the districts were still there so that you can get an excellent sense of how the districts have changed over time (aka gerrymandering).

Together with adding in the spoilt and non-vote data, this gives end-users a mobile responsive interactive playground to get a sense of who, where, and what the parties contests / results were in the three elections (GE2011, GE2015, and GE2020) in the last decade.

The animation portion, together with the cleaning up of the geojson map data, was probably the most time-consuming of all.

The code for this visualization has been retooled and rewritten from the ground up, and none of the old code has been reused. A mix between using mapbox as the underlying raster map tile layer, and a D3.js SVG choropleth map overlay.

Live GE2020 visualization, and the aftermath

Although we offered to several of the smaller media outfits whether they wanted to embed our charts, this offer wasn’t taken up.

However, because I was publicizing it on Facebook, Linkedin and Twitter, somehow it still went viral. In fact, more viral than our previous project in 2015.

No alt text provided for this image

In just a short one-week span (actually more accurately just 3 days), we hit 300K+ users, 550K+ sessions of folks who were checking the live visualizations.

Thanks for the traffic, and I hope people found the visualization useful! Luckily our servers didn’t crash, though one thing that shocked me a little was the bill for the map tile base from Mapbox (over US$1.6K). Seems like I waaay busted the free tier usage.

I’ll probably be switching out the tiles to a different tileset in the future (will be trying out SG onemap API when I have time), as for a community based project for the data viz meetup community, I can’t afford this for a non-profit project.

Thanks for stopping by the visualization, and I hope people found it useful!