Project description

To report the results of the presidential elections in Costa Rica on the 4th of February, we wanted to give our readers two specific products: a web application where they could find information about the 57 candidates elected for Congress; and an in-depth data analysis about the election results.
On the night of the 4th of February, once the electoral results started to arrive, we launched a web application with the candidates that had been elected for Congress, and it changed in real time, according to the results. The readers could see the candidates elected by party and for each province, and could click on each of them to see information about their stance on three topics of national interest: the fiscal reform, public wages and same sex marriage.
In addition, the day after, we published an analysis of the presidential results, that explained how a religious minority party had won the first round and had conquered territories previously dominated by Liberación Nacional (the most traditional party in the country). Using maps, data visualization and reporting, we were able to give our readers a unique in-depth analysis, that explained a surprising result in Costa Rica’s political history.

What makes this project innovative?

To be able to give a quick response to live results, prior to the elections we automated the analysis and collected information about the candidates for Congress that had the biggest chances of being elected.
For the web application, we had previously interviewed the candidates to collect information about their profile and political views. We had all the information in a database which was connected to the live results, and on election night, as the candidates were elected, they appeared on the website.
The result was surprising: an evangelical party that had only elected a deputy in 2014, elected 14 candidates in this election. They were completely unknown for the public, hence the importance of showing who they were in real time to our audience. Even though other media were reporting on the new Congress, we were the only ones who had interactive information about the new candidates.
Moreover, we wanted to be able to give an explanation the quickest way possible of the presidential electoral results. Two days before election night, we automated a results’ analysis and data visualizations using RStudio, in order to compare the 2014 and 2018 presidential results by district. Once we had the 2018 results, we ran the analysis and were able to answer the question of how a religious party (Restauración Nacional) had won the first round. We showed how the electoral map had shifted in four years, which party won in each district, the variation in the vote by party and explained the worst electoral performance of Liberación Nacional Party in their 65 years of participating in the elections.

What was the impact of your project? How did you measure it?

We used chartbeat and Google Analytics to measure the visitation. The app was the most visited product in La Nación on the 4th (day of the elections) and 5th of February, with 109,565 views, and an average time on site of 3:03 minutes.
The story about the results had 16,854 views and an average time on site of 05:43, which is an excellent metric for us, since it showed the people read the whole story.
These two products were part of a bigger project about electoral coverage that started in January. They were the most successful pieces, which showed the importance of giving our audience valuable information the fastest way possible.

Source and methodology

For the historic results, we used electoral data from the Supreme Electoral Tribunal and analysed it using RStudio. For the stories about the candidates running for Congress, we interviewed 137 candidates and investigated their past, using information from the newspaper archives and judiciary files.

Technologies Used

For data analysis we used RStudio, and to organise the information of the news app and the profiles of the candidates running for congress we used Google Spreadsheets. All of the visualizations were done using Tableau, and RStudio, using packages like ggplot2 and beeswarm. We also used HTML, Javascript, CSS, Jquery and JSON.

Project members

The Data Journalism Team of La Nación: Darío Chinchilla, Bryan Gutiérrez, José Salazar, Hassel Fallas, Mercedes Agüero


Additional links

Project owner administration

Contributor username


Click Follow to keep up with the evolution of this project:
you will receive a notification anytime the project leader updates the project page.