World Food Production Descriptive Analysis in Python

Restu Nugroho
3 min readMar 22, 2022

--

Photo by Boudewijn Huysmans on Unsplash

Introduction

In this article, I would like to share my work on doing descriptive analysis on World Food Production data. The main purposes of this article are to demonstrate descriptive analysis with Python, and get some general insights from the data.

Some questions for this descriptive analysis are :

  1. what are the highest commodities produced by the world ?
  2. what are the highest commodities produced by particular country ?
  3. how is the trend of amount of commodities produced by particular country (Indonesia) ?
  4. what are the most productive countries for producing particular commodity (rice) ?

Data

The data is taken from https://www.kaggle.com/dorbicycle/world-foodfeed-production. This data have several columns, which in general describe countries, Items, food or feed category, and amount of productions from year 1961 to 2013.

Descriptive Analysis

Data reading

pandas read_csv function is used to read the dataset file. This function return a dataframe object. As described in the data webpage, it need read with encoding ‘latin1’, so I it need parse as parameter.

df = pd.read_csv('FAO.csv', encoding='latin1')

After that, we can see some samples of the data by using head function

df.head(3)
sample rows of the data

The table contains data of country, Items (commodities), Element (Food or Feed) and amount of production from year 1961 to 2013.

Below some data description through visualization. Full code can be viewed in this jupyter notebook file

10 Highest commodities in the world from 1974 to 2013

From above graph, we can easily see the 10 highest commodities in the world. ‘Cereals-Excluding Beer’ is the highest commodity, followed by ‘Milk-Excluding Butter’ and ‘Vegetables’ with around 3/4 and 1/3 amount of ‘Cereals-Excluding Beer’. ‘Starchy Roots’, ‘Maize and products’, ‘Vegetable’, ‘Wheat and products’ have almost the same amount, and so on.

5 Highest commodities produced by Indonesia from 1974 to 2013

We also can see the highest commodity in particular country (in this case, Indonesia). In Indonesia, the highest commodity is ‘Cereals-Excluding Beer’, followed by ‘Rice’ (around 3/4 amount of Cereals), ‘Starchy Roots’ (around 1/2 amount of Rice), ‘Cassava and products’, and ‘Fruits-Excluding Wine’

Trend of highest commodities produced by Indonesia

In above graph, we can see the trend of 5 highest commodities in Indonesia. For ‘Cereals-Excluding Beer’, the production is increasing almost in every year, except in 1990 and 1996. For Starchy Roots, the number of production is tend to constant.

we also can see the most productive countries for particular commodity (in this case, Rice). China, India, and Indonesia are the 3 highest countries produces rice. China and India have significantly high amount for producing rice compare to other countries.

Conclusion

Through data visualization, we can do descriptive analysis and get some general knowledges of our data.

--

--