# install.packages(c("janitor", "ggridges", "ggforce"))

🔧 Exercise 6C

Global Crop Yields

The data below comes from Our World in Data and sourced from Tidy Tuesday. This data contains agricultural yields across crop types and by country from 1960 onwards.

## Rows: 13,075
## Columns: 14
## $ entity                         <chr> "Afghanistan", "Afghanistan", "Afghani…
## $ code                           <chr> "AFG", "AFG", "AFG", "AFG", "AFG", "AF…
## $ year                           <dbl> 1961, 1962, 1963, 1964, 1965, 1966, 19…
## $ wheat_tonnes_per_hectare       <dbl> 1.0220, 0.9735, 0.8317, 0.9510, 0.9723…
## $ rice_tonnes_per_hectare        <dbl> 1.5190, 1.5190, 1.5190, 1.7273, 1.7273…
## $ maize_tonnes_per_hectare       <dbl> 1.4000, 1.4000, 1.4260, 1.4257, 1.4400…
## $ soybeans_tonnes_per_hectare    <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
## $ potatoes_tonnes_per_hectare    <dbl> 8.6667, 7.6667, 8.1333, 8.6000, 8.8000…
## $ beans_tonnes_per_hectare       <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
## $ peas_tonnes_per_hectare        <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
## $ cassava_tonnes_per_hectare     <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
## $ barley_tonnes_per_hectare      <dbl> 1.0800, 1.0800, 1.0800, 1.0857, 1.0857…
## $ cocoa_beans_tonnes_per_hectare <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
## $ bananas_tonnes_per_hectare     <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
  1. [Produce a choropleth map of the wheat yield by country in 1998 and then in 2018.]
Global weath yield in 1998 and 2018 by country

Figure 1: Global weath yield in 1998 and 2018 by country


Figure 1 conveys that the wheat yield in some countries increased from 1998 to 2018. It is shown by the lighter blue color in the same country in 2018, for example in China and Russia. Figure ?? also suggests that the total wheat yield globally has increased from more that 400 tonnes/hectare to nearly 500 tonnes/hectare.


  1. Produce a single graphic that highlights one major change in wheat yield in 2018 compared to 1998.
Global wheat yield in 1998 and 2018

(#fig:6cb, )Global wheat yield in 1998 and 2018


  1. You’re on the quest to find the 2018 World Crop Capital for each crop type! [Produce graphic(s) to show which countries have the greatest crop yields per hectare.
Top 5 countries with greatest crop yields in 2018 by crop type

Figure 2: Top 5 countries with greatest crop yields in 2018 by crop type

Based on Figure 2, we could see top 5 countries with the greatest crop yield. The top producers are highlighted in blue. We can see that the greatest producers vary among the crop type. In wheat, rice, and bananas categories, the gap yield between these top 5 countries is not that far.


  1. Global crop production has been increasing over time. Produce a graphic that shows this effectively.
The trend of global crop yield from 1961-2018 by crop type

Figure 3: The trend of global crop yield from 1961-2018 by crop type

From Figure 3, we could infer that the global crop production has a positive trend in most type of crop. Potatoes, bananas, and cassava are the crop types with the highest production in the period given. Meanwhile, cocoa has almost flat trend. We coould also see that peas and soybean share a similarity in term of production.