Do you really know the price of milk?

AJ Labs
5 min readOct 22, 2018

Most people don’t know the prices of everyday items. Well, at least that was our main assumption when producing an interactive data-driven quiz about the cost of living worldwide.

Knowing the price of milk (or bread, or rice) has long been used to gauge how well somebody is in touch with the daily realities of life. Politicians, in particular, have been caught off-guard. The assumption is that somebody struggling with money is more likely to pay attention to how they ration out their monthly expenses compared to somebody who doesn’t blink an eye when dropping items in their shopping trolley.

The other assumption is that most people have an idea of where their country ranks in terms of daily expenses, but in order to actually realise this position one has to compare with other countries.

Of course, this is not without its downsides. Directly comparing the cost of living, item for item, does not factor in a country’s median salary or standard of living. Nevertheless, it should give somebody an idea of where their country stands.

These two assumptions were the driving forces behind do you really know the price of _____?

Why Numbeo?

After thoroughly sampling the prices of items from around the world with our diverse newsroom we found that Numbeo’s data was generally quite accurate. In addition:

  1. It offers a wide range of products/services.
  2. It gives the prices in both US dollars and local currency.
  3. It provides a high range, a low range, and an average range of cost per product/service.
  4. Being user-contributed data, most of the values are fairly up-to-date.

For the sake of simplicity, we chose 25 items which best reflected the cost of living from 150 countries worldwide. We removed countries with too many incomplete values and then randomised 10 items per country to allow for some level of chance.

Shaping the story

Having worked on a couple of news quizzes in the past we decided to try and follow the Hypothesis-Driven Design (HDD) process as outlined by NPR. This iterative problem-solving method begins with a set of editorial assumptions that lead to user features which can be developed and validated.

The process, in brief, is divided into six phases: Research, Plan, Prototype, Develop, Launch, and Review. We found that most of our iterations happened during the prototyping phase and development phase. After following this process, we realised that it’s almost impossible to get everything right on one phase without revisiting it. Take, for example, the localisation of prices: This was one of the biggest challenges we faced late into the development phase. While it would have been much easier to just compare items using US dollars, we knew that a dollar figure would mean very little to people. This meant that we had to add local currencies.

Research, Planning and Prototyping

We spent some time researching other projects or platforms which deal with the cost of living. Most of what we found dealt with a cost-of-living index — a numerical value that ranks countries based on a standardised benchmark. We decided that it’s better to compare actual numbers as opposed to percentages or indices.

During the planning phase, we laid down our main list of assumptions which would become the building blocks for our features.

They were:

  1. People will play quizzes if there’s a payout at the end.
  2. People want to know how expensive their country is compared to the rest of the world.
  3. Since the “average price” if an item can vary quite a lot, readers should be able to select from a range of values.
  4. Readers should receive immediate feedback and have an incentive to continue playing.
  5. The entire experience should take just a few minutes to complete.

We used Sketch to prototype the project based on the requirements above.

Technicalities

For the backend, we wrote a Python script to fetch the data from Numbeo and stored it in a MySQL database. You can find the script here. Next, we queried the data that we needed and saved it in a big JSON file.

On the frontend, we evaluated a couple of technologies before settling on React. Since it was our first in-house ReactJS project there was a bit of a learning curve to figure out all of the necessary components and state management. React is a great platform for building fast single page applications like this one and we really wanted to see what we could do with it.

It turned out to be an excellent learning opportunity. Especially considering the wide range of React’s functionality that we needed to utilise including some state management and the flow of data between components. It also helped that we used the preconfigured create-react-app for spinning up all the project’s scaffolding. On the CSS side, we utilised React-Bootstrap.

Data analysis

To better understand our data we analysed it using R. You can find the script for the analysis here. Some interesting findings include:

  • Angola has one of the highest prices for a litre of milk worldwide.
  • Singapore has one of the highest prices for a Volkswagen Golf worldwide.
  • Egypt has one of the lowest prices for a can of Coke worldwide.
  • Monaco has one of the highest prices for rent in the city centre worldwide.
  • Australia has one of the highest prices for a pack of cigarettes worldwide.

So were we right?

To truly know if our assumptions were valid, we’ll have to analyse our user data. We’re looking at the quizzes completion rate, as well as the average score. We’ll publish our results once we’ve gathered enough findings. Check out the project here and let us know what do you think.

https://aljazeera.com/cost-of-living

--

--