Martín González

Visual journalist at The Economist, based in London.

Local & Regional Spain Election Results

While Lukas Appelhans and I were sharing a flat on Barcelona, we started to think on projects we could do together. As the elections approached, it seemed handy to create a good map to visualize the results.

We started working on a hackathon to get a prototype. Afterwards, we were able to get EL ESPAÑOL onboard for the Spanish local and regional election.

Local elections

The map is created with SVG and D3, getting the results from a C++ parser of the government data.

I was involved in the overall design, writing a series of bash scripts that smashed the country shapefiles together. The result: a (very) simplified TopoJSON with more than 8.000 cities.

Regional election

For the regional election we had to create a different layout. We opted for a long scroll with a fixed header, which allowed us to have full width maps. Each region (15 on this election) had a different website to get the data, with a separate login. It was a total mess.

In the end the app got 150.000 visits and was praised by data visualization experts as Alberto Cairo. It got traction on the Hacker News frontpage and specialized blogs.

Tools: D3.js, GDAL, TopoJSON, Bash scripting, jQuery, Bootstrap and SASS.

With Lukas Appelhans.

Go to the interactive