MÉMOVISUELDAGRONOMIE

Comparison of main production areas for organic farming and conventional farming

This map compares the area area under organic and conventional farming in France, so there is two variables to plot on a map.

One way to do that is to create a bivariate choroleth, as explained in this tutorial. Another way of creating a bivariate map is to mix a color gradient (ie univariate choropleth) with proportional symbols on centroids, as explained here.

1. Load data

The data we’re going to use here is available in the {frex} package I’ve created.

The goal of this package is to provide several layers of information for metropolitan France, particularly useful for analyzing agricultural systems. The basis of this package is a gridded map of France in hexagons of about 450 km2. For each hexagon, different information can be added using the package function, such as the surface area occupied by different types of crop, the nature of the soil or climatic data.

For the sake of simplicity, we won’t install the whole package, but only load the data we need, starting with the basemap of “gridded” France.

# Load packages
library(tidyverse)
library(sf)

# Load basemap
hex<-read_sf('https://github.com/BjnNowak/frex_db/raw/main/map/hex_grid.gpkg')

# Make plot
ggplot(hex)+
  geom_sf()

We will now load the data tables to fill the basemap (one table with the total area, an other with the area under organic farming for several crops).

They may be loaded as shown below:

# Load data
# Total crop area
total_area<-read_csv('https://raw.githubusercontent.com/BjnNowak/frex_db/main/data/crop/crop_distribution.csv')
# Organic crop area
organic_area<-read_csv('https://raw.githubusercontent.com/BjnNowak/frex_db/main/data/crop/organic_crop_distribution.csv')

If you look at the hex object, you will see that each hexagon has a unique identifiant (hex_id column), that is also present in the data files: hence we can join the data tables to the basemap, starting with the one with total area.

# Merge basemap and data
total<-hex%>%
  left_join(total_area)

Before going further, we will make a simple choropleth showing wheat area. The total area under wheat (expressed in km2) is stored in the soft_wheat_area_km2 column.

library(scico) # For color palette

map_1 <- ggplot(total,aes(fill=soft_wheat_area_km2))+
  geom_sf()+
  scale_fill_scico(
    palette="batlow",
    na.value = "grey75",
    direction=1,begin=0,end=0.75
  )+
  labs(fill="Total wheat")+
  theme_void()

map_1

2. Point on centroids

We will now prepare the data to plot on the centroid of each hexagon of the map a symbol with size proportional to the soft wheat area under organic farming.

We will start by extractiing the centroid of each hexagon:

# Merge map and data
organic<-hex%>%
  left_join(organic_area)%>%
  # Get centroid
  st_centroid()

Centroids may be plotted this way:

ggplot(organic,aes(size=organic_soft_wheat_area_km2))+
  geom_sf(pch=21,fill=NA,color=alpha("black",0.5))+
  scale_size(range=c(1,7))+
  theme_void()

They may also be added to the first map:

map_2<-map_1+
  geom_sf(
    organic,
    mapping=aes(size=organic_soft_wheat_area_km2, geometry=geom),
    pch=21,fill=NA,color=alpha("grey80",0.8)
  )+
  scale_size(range=c(1,7))+
  labs(size="Organic wheat")+
  theme_void()

map_2

As you can see from the map, the main wheat-growing area in France is in the north (according to the color gradient). Whereas the main production zone for organic wheat is in the south-west.

This could partly explain the yield gap between organic and conventional production, as growing conditions are more difficult in the southwest.

For practice, you may now try to produce the same kind of maps for the other crops (data available in the columns of the tables already loaded).