TURNING LOCAL KNOWLEDGE ON AGROFORESTRY INTO AN ONLINE DECISION-SUPPORT TOOL FOR TREE SELECTION IN SMALLHOLDERS’ FARMS

SUMMARY This paper presents the main features of a unique decision-support tool developed for selecting tree species in coffee and cocoa agroforestry systems. This tool aims at assisting in the selection of appropriate shade trees taking into account local conditions as well as needs and preferences of smallholder farmers while maximizing ecosystem services from plot to landscape level. This user-friendly and practical tool provides site-specific recommendations on tree species selection via simple graphical displays and is targeted towards extension services and stakeholders directly involved in sustainable agroforestry and adaptation to climate change. The tool is based on a simple protocol to collect local agroforestry knowledge through farmers’ interviews and rankings of tree species with respect to locally perceived key ecosystem services. The data collected are first analysed using the BradleyTerry2 package in R, yielding the ranking scores that are used in the decision-support tool. Originally developed for coffee and cocoa systems of Uganda and Ghana, this tool can be extended to other producing regions of the world as well as to other cropping systems. The tool will be tested to see if repeated assessments show consistent ranking scores, and to see if the use of the tool by extension workers improves their shade tree advice to local farmers.

experience in their own environment as a source of valuable information on the services and disservices provided by trees (Sinclair and Joshi, 2001). Clearly, this local knowledge needs to be complemented by scientific knowledge in order to ensure that sound recommendations are given on tree species.
The purpose of this paper is to present an agroforestry decision-support tool at plot level based on local knowledge, developed for selecting shade trees. The selected tree species have to be beneficially associated with the crops to which they provide shade. They also have to be well adapted to local conditions and smallholder farmers' needs while maximizing ES. This tool is targeted towards extension services and stakeholders involved in sustainable agroforestry and innovation for adaptation to climate change.

TO O L D E V E L O P M E N T
The goal was to develop a decision-support tool at plot level geared towards extension officers of cooperatives and rural development projects that can be used to help smallholder farmers select tree species for their coffee/cocoa plantations and farms, based on the premise that there should be a large diversity of possible tree species combinations depending on the context of the farmer's livelihood. Therefore, this decision-support tool, based on local knowledge, was developed so that every individual farmer could receive technical advice specific to his/her needs and his/her local context.
This tool is primarily based on local agroforestry knowledge collected in the field through interviews with farmers and rankings of tree species according to services (e.g. shade quality, pest and disease suppression or soil fertility improvement) provided by the shade trees as perceived by local farmers (Sinclair and Joshi, 2001). Tree species ranking by farmers is an interesting approach to document local knowledge more precisely as it generates an efficient way to differentiate target tree species based on scores (Walker et al., 1999). Collected data are analysed statistically and ranked in a systematic way as briefly explained below and in more details by Heinze (2013), and Smith-Dumont et al. (in press).

Acquiring data
Prior to using the tool, if tree species rankings are not already available, data should be collected in the following manner: 1. Select the region of implementation (for example: country, province, watershed, altitude or rainfall zone). 2. Identify issues and prioritize ES that are relevant to the farmer's livelihood context. This can encompass a broad range of ES, taking a full farmer's need approach or very specific ones, such as bee keeping for enhanced pollination of a particular crop or suppressive effects of certain specific pests and diseases depending on objectives of the development agent. 3. Select shade tree species based on inventories of local farms. 4. A specific population group can be targeted (e.g. women, youth) if it is relevant for the development agent. For the development of the tool, a target zone is defined as an ecological zone where the rainfall and temperature pattern is homogeneous. Depending on the landscape, this can vary from less than 100 km 2 in mountainous areas to several 100 km 2 in a more uniform and flat area. In this context, databases have already been constituted for Mount Elgon that is an Arabica region and Greater Luweero that is a Robusta region in Uganda; and for the Western region for cocoa, in Ghana. In these regions, a list of 20 to 30 most prevalent shade tree species per target zone was made based on incidence in coffee or cocoa farms after a thorough tree inventory on around 100-150 farms. This tree inventory was combined with interviews of female and male household members on their views regarding tree species influencing light, temperature, space, nutrient and water availability, pests and diseases incidence, the value of the products derived from these trees and importance in terms of revenue diversification and/or food security, as well as the provision of other ES. For the development of the tool, 10 to 12 ES were selected based on farmers' perceived benefits of shade trees in their respective target zone and farms as illustrated in Table 1 for the Arabica coffee-producing zone in Mount Elgon, Uganda.
Out of the list of 20-30 most prevalent shade trees, farmers were first asked to select 10 tree species that they knew best in their target zone. This process was made easier using tree species fact sheets comprising the name in local languages with clear recognizable pictures of the tree characteristics such as the shape of canopy and trunk, colour of the bark, flowers, fruits and leaves.
Then, farmers were asked to rank those 10 tree species that they selected with respect to each of the 10-12 selected ES, while keeping in mind: 'To my opinion, which tree species is the best provider of that specific service, which tree species is the next one in line and so on'; farmers were helped with clear pictograms of the various ES. Tied ranks were allowed when a farmer thought that two tree species were equally capable of providing a certain ES. Local knowledge about tree services is a reliable source when a large number of farmers are interviewed; the survey sample should not be smaller than 80-100 persons per zone (Walker et al., 1999). More detailed information on the methodology, tree species and ES selected is presented 54 J U S T VA N D E R WO L F et al.
for cocoa in Ghana by Meyer-Sand (2014) and in Rwanda by Smith-Dumont et al. (in press).

Data analysis
The BradleyTerry2 package in R is used to analyse data (Turner and Firth, 2012). This analysis yields a score for each of the ranked tree species, and hence an overall ordination of the species based on their ranks. The model is defined so that the probability that one species is ranked above another depends on the difference between their scores. It does not allow these scores to be interpreted as absolute scores, but rather as scores meaningful only relative to one another. Consequently, it was decided to shift the lowest score to zero, yielding only positive scores. The Bradley Terry analysis also produces a confidence interval, which can be seen as an indicator of the frequency and the homogeneity with which farmers are ranking tree species; larger confidence intervals are associated with tree species that farmers know less and hence tend to select less frequently and rank less concordantly. As the confidence intervals can vary quite significantly between trees, it was decided to plot the trees not solely based on the order of decreasing scores, but on a combination that includes both the score and the size of the confidence interval. This prevents the tool from recommending tree species with relatively large confidence intervals and hence high uncertainty associated to these particular species.
The advice is based on local farmers' rankings of shade trees for various ES provided by the trees, but additionally, a series of criteria and conditions was set up for developing the decision-support tool: r Advice is displayed in an easy-to-understand and user-friendly way. r Multiple ES can be weighed and included in the advice in accordance to the local preference of the target farmer.
r A list of tree species is recommended rather than "one species fits all'. r The tool is freely available and will be accessible online as a web app. r The protocol for data collection and ranking analysis is readily available for extension of the tool databases with new tree species, ES, regions and crops.
The use of the tool can easily be extended to new shade tree species and/or ES as well as other regions and crops.

Validating data
After data acquisition and analysis, recommendations will be validated through peer-review. This will be done through (1) discussion groups or interviews with farmers and (2) review by experts.
Extension services, cooperatives and NGOs should use the recommended list of species as input for a discussion with farmers, and take into consideration knowledge about additional cropping systems as well as off-farm resources and revenues and other criteria (e.g. availability of local markets, food security of household, ease and cost of management, cost-benefit ratio, short-term benefits).

TO O L S E T U P
The tool was developed in R and is freely available on request. Furthermore, an HTML version of the tool is in development, which will be available online as a web app.
As shown in the flowchart (Figure 1), the end-users first pick the country, region and crop of interest. After that, they can choose one to several ES available and also give these ES varying weights according to the specific needs and locally perceived importance (weights range from 1: relatively unimportant to 5: very important). The tool links the recommended tree species to a tree library, associated with the tool, which links to other online databases such as the ICRAF Agroforestree library and the PROTA (4U) library, so that comprehensive information is available before a definitive choice is made.

Calculating advice scores based on needs of farmers
The selected weights are used to calculate the weighted score for each ecosystem service (see Equation (1)).
Here, WS t i is the weighted score, extracted from the ranking scores RS t i coming from the Bradley Terry analysis for each tree species t and ecosystem service i, by weighing them with weights w i . These WS t i are then summed for the different ES (see Equation (2)).
Here, A S t is the advice score, for each tree species t. The result is plotted as a stacked bar graph, where the advice score per tree is broken down into the weighted scores WS t i . The confidence interval is calculated only for the final advice score, as shown in Equation (3).
Here, A σ t is the 68% confidence interval for the advice score, and Rσ t i is the quasi standard error for each of the ranking scores RS t i for each tree species t and ecosystem service i.

Decision criteria
Once the ranking scores are calculated, a series of decision criteria/thresholds still needs to be applied in order to select the group of shade tree species that can be 56 J U S T VA N D E R WO L F et al. recommended. Two criteria were developed to guide end-users' decisions in selecting a group of tree species from the ranking displayed on the graph. The first criterion is the minimum number of tree species recommended. By default, this minimum number has been set to four species. The second criterion limits the maximum number of tree species recommended by setting a lower boundary for the scores. By default, this boundary value has been set at 75% of the score given to the top (one) species in the context of interest. Only trees that have their confidence intervals above this boundary value are recommended to the farmer. Clearly, a high diversity of shade trees in agro-forestry systems will do better for the provision of ES at many scales (Schroth and Harvey, 2007;Vaast and Somarriba, 2014). Diversity of shade trees can be quite large in contexts where natural regeneration of shade trees is easily achievable or where forest is being thinned down or cleared for agriculture. In such areas, a variety of shade trees can be picked from the existing biodiversity. In areas where this is not possible and where nurseries need to be set-up to grow particular shade trees, practically, it is only possible to promote a limited number of tree species. In order to accommodate for these different contexts, both criteria described above (determining the number of recommended trees) can be easily adjusted in the tool by the end-user. Although this tool gives recommendations for shade trees for a particular crop growing on a particular plot, ideally, this is embedded in a broader sustainable agricultural planning process where conditions at farm, community, landscape and market levels are taken into consideration. Despite the fact this is still a challenge in most cocoa-and coffee-producing countries in Africa, final recommendations by agricultural services should rely on the recommended list of species, but also need to adapt this list to a wider context than the perennial crop systems of interest by using additional criteria and knowledge about the other cropping systems on the farm, off farm resources and the landscape context.

Single ecosystem service
It is possible for the end-user to select just one particular ES for a specific zone as shown in Figure 2 below for soil erosion control in Arabica coffee, at high altitude in the Mount Elgon region.
As the scores are not absolute scores but rather relative to each other, they were shifted to start at zero for the lowest ranked tree species, presently Carica papaya in Figure 2. As explained above, the tree species are plotted, based on a combination that includes both the score and the size of the confidence interval. In this particular example, Cordia africana and Ficus mucosa are actually plotted above Faidherbia albida despite its higher score. The larger confidence interval implies higher uncertainty associated to this later species with respect to its beneficial effect on soil erosion.
As set up by default, the 'Top 4' recommended species, namely C. africana, F. mucosa, F. albida and Albizia coriaria are highlighted with a star ' * '. Ficus sur, the fifth ranked species, is not part of the recommended species as the dotted line indicating the 75% threshold is located in front of the lower end (left) of its confidence interval. Clearly, the end user could decrease this limit down to 70% or lower to allow the inclusion of F. sur and possibly F. natalensis in the recommended list as well.
One of the features that will be included in the web app is an interactive link to the tree library through a click on the tree species name which will provide access to 58 J U S T VA N D E R WO L F et al.  information on the main tree characteristics such as tree description with photographs, growth rate, propagation methods, optimal ecological zone and so on. This tree library is built after compiling information on the tree species from various sources available in the literature such as the Agroforestree database of ICRAF and the PROTA library, and a thorough check for consistency of information.
Multiple ecosystem services with uniform or differential weights It is possible for the end-user to select a limited group of ES to address priority needs of farmers in a particular zone as shown in Figures 3 and 4. Furthermore, it is also possible for the end-user to vary the weights given to each of these services to tailor the tree species recommendation to the specific context of any individual farmer.
From these advising scenarios (Figures 3 and 4), it can be seen that increasing the 'weight' from 1 to 5 for some ES, in order to emphasize them, did not result in marked differences in the ranking of the tree species; C. africana, F. mucosa, A. coriara and F. ovata are still the top four recommended species in Figure 4 as they were in Figure 3.

Farmers' weights
During interviews, farmers were also asked to rank the different ES according to their locally perceived importance. These rankings, whenever available, can also be used in the tool to display an overall ranking of the different shade trees with respect to all the ES combined and weighed according to farmers' preferences in the target zone ( Figure 5).

Scenario examples
To illustrate its flexibility and high capacity in proposing options for highly specific needs, we run this tool pretending that it is geared towards particular (fictional) farmers located on the altitudinal gradient of Mount Elgon, Uganda.
Farmer 1 (female household head) and Farmer 2 (male household head) are located at low altitude while Farmer 3 (male household head) is located at high altitude; coffee of farmer 1 suffers from high temperatures, and while she wants additional timber, her focus is on intensifying coffee production. Her neighbour, Farmer 2, has the same issues, namely maintaining a high coffee yield combined with a high interest in timber, but farmer 2 is not too preoccupied by the effect of temperature on his coffee. Located on steep slopes at higher altitude, Farm 3 is subject to soil erosion and is located far from local markets, making it harder for the household to access food.
Based on these farmers' needs and priorities, various weights were attributed to the selected ES as shown in Table 2, and the decision-support tool recommended which shade tree species to promote in the respective coffee farms.
For Farm 1, as shown in Figure 6, the recommended top tree species are C. africana, A. coriaria, F. mucosa, F. albida and F. sur, with all species rated high by farmers for their capacity to produce high-quality timber and provide a favourable micro-climate for coffee productivity.   For Farm 2, as shown in Figure 7, the recommended list of tree species is somewhat similar to the one of Farm 1. However, Metrosideros excelsa was not included in the recommended list of Farmer 1 and is now in third position due the strong focus of Farmer 2 on timber production and hence higher weight assigned to this ES. Farmer 2 can start planting this tree species as well as the other recommended ones, but should be cautious as Figure 7 indicates that this particular tree species, although excellent for timber production, does not score well on temperature regulation or enhancing coffee yield. Consequently, Farmer 2 should preferentially plant this tree species on the boundaries of his coffee plantation. Besides recommendations on which shade trees provide ES adapted to the needs of the farmer, care needs to be taken on which agro-forestry configuration needs to be adopted. Although not a primary feature of the tool, this will be added in future tool development.
For Farm 3, as shown in Figure 8, the recommended list is quite different from those of the two previous low-altitude farms. The dotted line is plotted at 45%, indicating a more constrained selection of the top four tree species. Although Musa paradisiaca is at the top of the list, Farmer 3 already grows banana in association with his coffee, and is looking for fruit trees that can improve the household diet and even more so for tree species recognized for their beneficial impact against soil erosion. Therefore, this farmer is advised to plant C. africana and F. natalensis as well as avocado (Persea americana). Farmer 3 should also be advised to even incorporate some fruit tree species  such as jackfruit (Actocarpus heterophyllus) that are far down the list and not necessarily good for erosion but will help fulfil the household dietary needs.

C O N C LU D I N G R E M A R K S
Originally developed on coffee and cocoa systems of Uganda (Bukomeko, 2015) and Ghana (Meyer-Sand, 2014), the use of this decision-support tool can readily be extended to other coffee and cocoa producing regions as similar data collection and tree ranking exercises have already been undertaken in Rwanda (Smith-Dumont et al., in press), Kenya (Lamond et al., 2019), Cote d'Ivoire (Smith-Dumont et al., 2014),   India (Mahfuz, 2008;Sharma, 2008), Costa Rica (Cerdan et al., 2012) and Guatemala (Martin, 2007). As this tool is essentially based on local agroforestry knowledge via farmers' interviews and rankings of tree species with respect to locally perceived key ES, it is important to keep in mind that farmers, within a rural community or region, could have collectively biased or partial views about the services or disservices associated to particular tree species. For example, and as documented in Rwanda, farmers' knowledge about newly introduced tree species originates mostly from extension services, with personal experiences often limited to trees in their juvenile phase and to short-term interactions between coffee and these tree species (Smith-Dumont et al., in press). Therefore, local knowledge needs to be complemented by scientific knowledge, at least through the consultation of the tree library associated to the tool, in order to ensure that appropriate tree species are recommended. In this library, information on tree density and spatial arrangement, and management requirements will be provided so that the most complete species-specific agricultural recommendations possible can be given to farmers. The tool is set up in such a way that data and recommendations will be peer reviewed before release.
A second caution with respect to tree species recommendations has to do with causal correlation between ES. As some ES can be strongly correlated (e.g. air temperature regulation and soil moisture conservation), tree species will be ranked similarly for both ES and the tool will overemphasize their importance in the selection process. When a farmer selects two correlated ES along with a third unrelated one, the tool will yield an advice favouring the correlated ES over the uncorrelated one. A parameter (Wolf-τ, unpublished research) could be added to the tool in order to inform users on these possible interactions.
A third caution is that this decision-support tool should not be used blindly; ideally, the recommended list of tree species should not be the option to be passed onto farmers without any additional analysis of the farm and household features within the local socio-economical context. Extension services, cooperatives and NGOs should use the recommended list of species as input for a discussion with farmers, and take into consideration knowledge about additional cropping systems as well as off-farm resources and revenues and other criteria (e.g. availability of local markets, food security of household, ease and cost of management, cost-benefit ratio, short-term benefits).
This tool will be freely accessible on the websites of IITA and ICRAF. Research institutions, NGOs and extension services of cooperatives and governmental institutions are encouraged to add information and databases, widening its current geographical and crop scopes. Indeed, new zones, regions or countries can be added to the open-access library, under the condition that collection of local agroforestry knowledge, farmers' rankings of tree species and subsequent data analysis strictly follow the recommended protocols as proposed in literature (Cerdan et al., 2012;Coe, 2002;Sinclair and Joshi, 2001;Smith-Dumont et al., in press;Soto-Pinto et al. 2007). Clearly, other cropping systems could also be added, under the same conditions. In order to insure quality control of the data used by the tool, it is envisaged that IITA will have a supervising role over the tool, organizing a peer-review of new datasets before uploading them for public use.