I'm analysing sustainability in British Columbia's agricultural sector as a first step towards developing an agent-based model (ABM). The goal is to predict changes in agricultural under different climate-change scenarios. A beginning is to examine BC's agriculture using Principal Component Analysis (PCA). Here I've worked at two scales and with different variables. The first scale is at the agricultural subdivision level in Metro Vancouver.
The subvisions are: Maple Ridge, Electoral Area A, Pitt Meadows, Delta, Langley, Surrey, Richmond and Delta. The variables are: share of farmland owned by the operator, median age, share of farms with gross annual income of less than $10K, between $10K-$100K, between $100K-$500K, more than $500K and the ratio of farm expenses to income. Clearly there are other variables which could be included, such as economic data—employment for example. This is just a start.
I'm including my R code for reasons of reproducibility (and suggestions/help welcome!)
localreg <- read.csv("C:/Users/Stephen/Dropbox/delta/localreg.csv", row.names = 1)
library(FactoMineR)
bcag <- PCA(localreg, quanti.sup = 2:5, graph = FALSE)
This loads the dataset 'localreg' but eliminates variables 2:5 because they are not required in the calculations. We get an object 'bcag' containing a principal component analysis (PCA) of the dataset. PCA reduces the dimensionality of the data to a smaller number of components. We can look first at the contributions of the variables:
plot(bcag, choix = "var", invisible = "quanti.sup")
The plot shows that the variables can be split into only two dimensions pretty well: 72.98 + 15.95 = 88.93%. This means that we can look at the correlations shown in the circle above with some confidence. The closer the lines emanating from the centre, the closer the correlation. The results: average farm size and median age are strongly negatively correlated: older farmers are on smaller farms the expenses and gross income ratio and share of area owned is strongly positively correlated: tenant farmers run their farms more profitably…(but perhaps don't invest enough back into their land?) The area owned and expenses income ratio are strongly negatively correlated with the share of farms with larger farm gross revenues. Areas with more larger farms are more profitable. We can also look at the contributions by regions to the dimensions
plot(bcag, choix = "ind")
The closer the points representing the regions, the more similar the agricultural characteristics of that region.
The 2011 Agricultural Census supplies some really useful observations, especially on land cultivation practices. I have amalgamated census subdvisions using the means of these variables: share of agricultural area rented share of area using no-till cultivation …plowing/using more crop residue …using commercial fertilizer …using or producing manure …applying manure …using grazing animals for manure …with a nutrient plan …with a shelterbelt …with a buffer zone around a water body …farmer average age …farmers living on the farm
bcagsust <- read.csv("~/bcagsust.csv", row.names = 1)
bcagsust <- bcagsust[, -1]
bcagsust.pca <- PCA(bcagsust, graph = FALSE)
plot(bcagsust.pca, choix = "var")
Here the explanatory power of just two dimensions has gone down: 32.77 + 20.07 = 52.07%. The rest is containing in other dimensions which means we cannot plot them in two planes, but we can look at the numbers
round(bcagsust.pca$var$contrib)
## Dim.1 Dim.2 Dim.3 Dim.4 Dim.5
## shrerented 12 5 0 7 12
## shrenotill 1 11 16 7 5
## shremostresidue 3 16 12 8 1
## shrecommfert 7 5 14 3 9
## shrfmspro_using_manure 13 11 0 14 0
## shrefmsapplying_manure 12 14 1 12 0
## shrefms_man_grazing_animals 3 3 16 15 25
## shrefmsnutrientplanning 4 13 20 0 1
## shrefrmssltrbelts 14 2 2 24 2
## shrefms_bufferzones 16 8 0 0 5
## avage 7 10 10 0 0
## shlonfm 7 3 8 9 38
Because the dataset includes a wide range of agricultural regions—from intensive poultry farming to open grazing—we need to interpret the dimensions carefully ourselves. For example, dimension 5 seems to represent the grazing farmers. They live on their farms, their animals naturally graze and they rent land.
Here is the distribution of farming areas by dimension
plot(bcagsust.pca, choix = "ind")
and we can group the regions by how close they are along the 1st dimension
bcagsust.hcpc <- HCPC(bcagsust.pca, graph = FALSE)
plot(bcagsust.hcpc, axes = c(1, 2), choice = "tree", t.level = "all", new.plot = TRUE)
For example, as far as the first dimension is concerned, Central Coast and the Bulkley-Nechako region are very similar.
Next step is to add a map of BC by agricultural census divisions and code the map with these results. Just looking for a shapefile!