How much more am I paying for fuel? Where are the cheapest stations?
Organisation size: Big
Publication date: 10/11/2021
Credit: Rui Barros, Cátia Mendonça
Biography: Rui Barros is a data journalist/ journocoder/ news nerd currently working at PÚBLICO, a daily newspaper in Portugal.
Diesel and gasoline reach the highest prices in recent years. But how much did that impact you? And where can you find the cheapest fuel around you? At Público, we developed a news application that allowed our readers to understand exactly how much they have been impacted by the fuel crisis.
The news application provided a personalized story about how much the fuel crisis was costing the reader, but also gave it some tips about where fuel was cheaper. We believe that the personalization it allowed was the key to its success, becoming a piece that keeps getting new visitors every day – making us believe that some people even bookmarked the page and use it regularly.
The data was being published on a government page. We used R programming language to get the data from the public API. Using GitHub actions, the script runs every day, allowing us to have an always up-to-date news application.
We used svelte to build the news application and d3 to develop the visualizations on the project.
What was the hardest part of this project?
The hardest part was to create a truly customizable experience for the reader. For example, we know that different cars consume different amounts of fuel. That meant that we had to scrape a publicly available database of fuel consumption of all cars being sold in Portugal so that we could determine how much is expected to be the consumption of a luxurious car compared to a town car.
What can others learn from this project?
Make sure your news application is simple to use, and yet allows the user to personalize it so much that they can get an automatically generated story that is about them. Data has the power to let you do so. Use it.