Overview

ClimMobTools the API Client for the ‘ClimMob’ platform in R. ClimMob is an open source software for crowdsourcing citizen science in agriculture under the tricot approach1. The approach aims the rapid assessment of on-farm evaluation trails in small-scale agriculture. Tricot turns the research paradigm on its head; instead of a few researchers designing complicated trials to compare several technologies in search of the best solutions, it enables many farmers to carry out reasonably simple experiments that taken together can offer even more information.

Usage

The breadwheat is a dataframe from crowdsourcing citizen science trials of bread wheat (Triticum aestivum L.) varieties in India. This is a sample data available at the ClimMob that can be fetched using the function getDataCM() from ClimMobTools and an API key from the ClimMob user’s account.

library("ClimMobTools")

# the API key
key <- "d39a3c66-5822-4930-a9d4-50e7da041e77"

dt <- getDataCM(key = key,
                project = "breadwheat",
                tidynames = TRUE,
                pivot.wider = TRUE,
                as.data.frame = TRUE)


names(dt) <- gsub("firstassessment_|package_|lastassessment_|registration_", "",
                  names(dt))

Tricot data with environmental covariates

We can add environmental covariates from package climatrends. Here we use function temperature() to compute the temperature indices for the first 80 days after planting.

library("climatrends")

dt$plantingdate <- as.Date(dt$plantingdate, format = "%Y-%m-%d")
dt$lon <- as.numeric(dt$lon)
dt$lat <- as.numeric(dt$lat)

temp <- temperature(dt[, c("lon","lat")],
                    day.one = dt[, "plantingdate"],
                    span = 80)

temp

Tricot data into rankings

The Plackett-Luce model is one approach to analyse the ClimMob data2. We build the farmers’ rankings as an object of class ‘grouped_rankings’. This allows the rankings to be linked to the environmental covariates computed previously and fit the model using pltree() from the package PlackettLuce.

We build the rankings using the function rank_tricot() from the package gosset.

library("PlackettLuce")
#remotes::install_github("agrobioinfoservices/gosset", build_vignettes = TRUE)
library("gosset")

R <- rank_tricot(dt,
                 items = c("item_A","item_B","item_C"),
                 input = c("overallperf_pos","overallperf_neg"),
                 group = TRUE)

dat <- cbind(R, temp)

pl <- pltree(R ~ maxNT + maxDT,
             data = dat)

summary(pl)

plot(pl)

References

1. van Etten, J., Beza, E., Calderer, L. & Van Duijvendijk, K. et al. First experiences with a novel farmer citizen science approach: crowdsourcing participatory variety selection through on-farm triadic comparisons of technologies (tricot). Experimental Agriculture 55, 275–296 (2019).

2. Turner, H. L., Etten, J. van, Firth, D. & Kosmidis, I. Modelling rankings in R: the PlackettLuce package. Computational Statistics (2020). doi:10.1007/s00180-020-00959-3