| Issue |
Cah. Agric.
Volume 35, 2026
Agriculteurs et artisans transformateurs, l'autre facette des filières d'huile de palme / Smallholders and artisanal millers: the least known actors of the global oil palm sector. Coordonnateurs : Sylvain Rafflegeau, George N. Curry
|
|
|---|---|---|
| Article Number | 17 | |
| Number of page(s) | 4 | |
| DOI | https://doi.org/10.1051/cagri/2026012 | |
| Published online | 04 June 2026 | |
Publication de données de recherche / Data paper
PalmPlanner: A R-Shiny application for designing oil palm-based agroforestry systems with farmers
PalmPlanner : Une application R-Shiny pour concevoir avec les agriculteurs des systèmes agroforestiers à base de palmier à huile
1
CIRAD, UMR AGAP Institut, F34398 Montpellier, France
2
UMR AGAP Institut, Univ Montpellier, CIRAD, INRAE, Institut Agro, Montpellier, France
3
CIRAD, UMR Innovation, 34398 Montpellier, France
4
INNOVATION, Univ. Montpellier, CIRAD, INRAE, Institut Agro, Montpellier, France
5
UMR DIADE, CIRAD, Montpellier, France
6
DIADE, IRD, Université de Montpellier, Montpellier, France
7
CIRAD, UMR TETIS, 34398 Montpellier, France
8
TETIS, Univ. Montpellier, CIRAD, Montpellier, France
9
Inclusive green development, Tropical Agricultural Research and Higher Education Center (CATIE), Turrialba, Costa Rica
10
Department of Sustainability Sciences, El Colegio de la Frontera Sur (ECOSUR). Campeche, México
* Corresponding author: This email address is being protected from spambots. You need JavaScript enabled to view it.
Abstract
This paper presents a R-Shiny application for the design of oil palm agroforestry systems with farmers in a participatory process, and then for visualizing at scale the spatial arrangements between species during field work. The application, called PalmPlanner, features an interactive user interface that enables farmers, technicians, and researchers to select various design patterns for oil palm, determine the number and locations of rows not planted with oil palm as free space for intercropping, and to adjust the distances between plants. Users can position intercrops or trees in lines or distribute them in a non-aligned pattern, either between or within the rows of oil palm. The primary objective of the application is to streamline the planting and replanting process by providing access to the spatial arrangement of plants, estimating final density for each species, and preventing the planting of new palm plants in areas previously occupied by oil palms in case of replanting.
Résumé
Cet article présente une application R-Shiny pour concevoir avec les agriculteurs des systèmes agroforestiers à base de palmier à huile dans un processus participatif. Il permet de visualiser les arrangements spatiaux entre les espèces lors du travail sur le terrain. L'application PalmPlanner propose une interface utilisateur interactive qui permet aux agriculteurs, techniciens et chercheurs de sélectionner divers modèles de plantation agroforestières à base de palmiers à huile, en gérant le nombre de rangées de palmiers afin de libérer de l'espace pour les cultures intercalaires, et d'ajuster les distances entre les plantes. Les utilisateurs peuvent positionner les cultures intercalaires en lignes ou de les répartir de manière éparse, soit entre, soit à l'intérieur des rangées de palmiers. L'objectif principal est de rationaliser le processus de plantation et de replantation en fournissant un accès à l'agencement spatial des plantes, en estimant la densité finale pour chaque espèce, et en empêchant la plantation de nouveaux plants de palmier dans des zones précédemment occupées par des palmiers en cas de replantation.
Key words: R Shiny / agroforestry / planting design / Elaeis guineensis
Mots clés : R Shiny / agroforesterie / design de plantation / Elaeis guineensis
© EDP Sciences, 2026
This is an Open Access article distributed under the terms of the Creative Commons Attribution License CC-BY-NC (https://creativecommons.org/licenses/by-nc/4.0), which permits unrestricted use, distribution, and reproduction in any medium, except for commercial purposes, provided the original work is properly cited.
1 Statement of need
This application was developed as a tool for assisting farmers, technicians and researchers to design innovative agroforestry systems following a participatory approach, in the context of the Optipalmex project (Feintrenie et al., 2022; Labeyrie et al., 2024). This project included the creation of a network of innovative oil palm plantations within individual farms in the southeastern states of Mexico. One of the project deliverables was to draw with each oil palm farmer, a figure of his/her innovative oil palm agroforestry system to be planted with the help of the project. The first figures were drawn by hand, then diagrammed using Power Point. However, working in the field to establish each plot required a representation to scale of the distances between the species and individuals belonging to a species associated with the oil palm seedlings. The R-Shiny application was created to meet this need. It enables users to rapidly visualize different design of planting systems and assist them to overcome potential difficulties during the planting process. The output map can be used to estimate the coordinates of each plant relative to a reference tree, assess the number of plants required for the planting, prevent the replanting of oil palm seedlings in the of felled old palms, and to estimate the final density of each species. This application can also serve as a support tool for studies which investigate the representation of targeted ecosystem services in existing intercropped and agroforestry systems, by introducing the concept of Ecosystem Services functional Spatial Unit (Rafflegeau et al., 2023). Furthermore, future enhancements could include mapping the typology of each species in three dimensions, as an input for more complex simulation models that simulate light interception (Perez et al., 2022). Such development could provide valuable insights into the competition for light among the species in the intercropped system and enhance users’ ability to select plant spacing designs.
2 App features
The application is built using R and the Shiny framework (Chang et al., 2012), incorporating several packages to enhance functionality and user experience. The Shiny app load functions are coded in the script helpers_App_Design.R. These functions allow the creation of a design with the (x,y) coordinates of plants based on input arguments given by the user interface. The user interface is designed using a navbarPage layout, featuring multiple tabs that allow users to input arguments for oil palm and intercrop designs. Each tab contains input fields for each species such as:
Selection of design patterns (e.g., square or quincunx, number of rows).
Specification of distances between plants (both inter and intra-row).
Customization of visual elements, including point sizes, colors and name of intercrops.
The interactive features allow to integrate until five species (crops or associated trees). Three tabs permit the following: 1) a tab for the design of the spatial arrangement of species between oil palm rows (intercrop); 2) a tab for species within oil palm rows (crop in palm row); and 3) a tab for species to replace specific palms identified in the design (Fig. 1). The selection of specific palms can be done directly through interactive selection of the plots by using click or the lasso/box tool provided by the renderPlotly function. In a similar way every point can be selected from the plot. The selected points are listed in a table, from which a deletion procedure can be applied when needed for specific designs.
All specific interactive procedures are detailed in the README.md provided on the github repository.
![]() |
Fig. 1 PalmPlanner interface with the selection of input arguments in the left tabs, and the output design in the right panel. Interface de PalmPlanner avec la sélection des paramètres d'entrée dans les onglets de gauche et le plan obtenu dans le panneau de droite. |
3 Use-case
In the context of the OptiPalMex project, the PalmPlanner application was utilized to create designs for each farmer involved in the project. Subsequently, before planting, farmers received an overview of their fields and had the opportunity to adjust the designs as needed. The use of the application during this phase enabled the development of new features to better address farmers’ requests. Figure 2 presents examples of project designs that incorporate various features (Fig. 2A: intercropping tabs; Fig. 2B: replanting and replacing palms; Fig. 2C: intercropping and planting in palm rows).
The co-design process between researchers and farmers required some figures as dialogue and representation tools. The fieldwork involving farmers and technicians required scale maps, which led to the creation of the PalmPlanner application. As the application is free and now available in github (https://github.com/rpaperez/PalmPlanner), it is possible to use it in the design process as an interactive tool between oil palm farmers and researchers.
![]() |
Fig. 2 Examples of designs generated with PalmPlanner. A) Double rows of oil palms planted following a quincunx design (intra-row = 9 m, inter-row = 7.8 m) and removing 1/3 oil palm row, intercropped with two cocoa rows following a quincunx design (intra-row = 3 m, inter-row = 3 m) and one row of bananas (intra-row = 9 m). B) Square oil palm design (intra-row = 9 m, inter-row = 9 m) on replanting area (quincunx; intra-row = 9 m, inter-row = 7.8 m) with cedar trees replacing oil palm on the edges of the plot. C) Oil palm quincunx design (intra-row = 12 m, inter-row = 8 m) with one annual crop (beans) within the row (intra-row = 1.5 m) and another one (maize) between rows of oil palm (intra-row = 2 m). Exemples de plans générés avec PalmPlanner. A) Double rangée de palmiers à huile plantés selon un schéma en quinconce (intra-rang = 9 m, inter-rang = 7,8 m) et suppression d'un tiers de la rangée de palmiers à huile, en association avec deux rangées de cacaoyers selon un schéma en quinconce (intra-rang = 3 m, inter-rang = 3 m) et une rangée de bananiers (intra-rang = 9 m). B) Disposition en carré des palmiers à huile (intra-rang = 9 m, inter-rang = 9 m) sur la zone de replantation (quinconce; intra-rang = 9 m, inter-rang = 7,8 m) avec des cèdres remplaçant les palmiers à huile sur les bords de la parcelle. C) Disposition en quinconce des palmiers à huile (intra-rang = 12 m, inter-rang = 8 m) avec une culture annuelle (haricots) dans la rangée (intra-rang = 1,5 m) et une autre (maïs) entre les rangées de palmiers à huile (intra-rang = 2 m). |
Acknowledgments
We acknowledge the contributions of the R community and the developers of the Shiny framework for providing the tools necessary to create this application. This work was supported by the Optipalmex research project in collaboration Cirad-PalmElit n°2021/17 and n°2024/15 with the support of the French Treasury through the Fund for Private Sector Studies (FASEP, AC/1301/MEXIQUE PALMELIT).
References
- Chang W, Cheng J, Allaire JJ, Sievert C, Schloerke B, Aden-Buie G, et al. 2012. Shiny: web application framework for R. CRAN: Contributed Packages. The R Foundation. https://doi.org/10.32614/CRAN.package.shiny. [Google Scholar]
- Feintrenie L, Labeyrie A, Ollivier J, Paitard I, Penot E, Vlaminck W, et al. 2022. Optimizacion inclusiva de la produccion de palma aceitera mexicana, OptIPalMex. Activity report. Montpellier (France): French Agricultural Research Centre for International Development (CIRAD), Palmelit. https://agritrop.cirad.fr/604567/2/OptiPalMex_2022_Compte%20Rendu%20annuel.pdf. [Google Scholar]
- Labeyrie A, Vlaminck W, Bouamra Y, Rafflegeau S, Lacan X, Feintrenie L. 2024. OptiPalMex: Transformando la producción de palma de aceite en México hacia un futuro sostenible e inclusivo. Revista P de Palma, n. spéc. Programa Holístico: 46-47. https://femexpalma.com.mx/revista-p-de-palma/. [Google Scholar]
- Perez RPA, Vezy R, Brancheriau L, Boudon F, Grand F, Ramel M, et al. 2022. When architectural plasticity fails to counter the light competition imposed by planting design: an in silico approach using a functional–structural model of oil palm. In Silico Plants 4(1): diac009. https://doi.org/10.1093/insilicoplants/diac009. [Google Scholar]
- Rafflegeau S, Gosme M, Barkaoui K, Garcia L, Allinne C, Deheuvels O, et al. 2023. The ESSU concept for designing, modeling and auditing ecosystem service provision in intercropping and agroforestry systems. A review. Agronomy for Sustainable Development 43(4): 43. https://doi.org/10.1007/s13593-023-00894-9. [Google Scholar]
Citation de l’article : Perez P-A R, Rafflegeau S, Labeyrie A, Feintrenie L. 2026. PalmPlanner: A R-Shiny application for designing oil palm-based agroforestry systems with farmers. Cah. Agric. 35: 17. https://doi.org/10.1051/cagri/2026012
All Figures
![]() |
Fig. 1 PalmPlanner interface with the selection of input arguments in the left tabs, and the output design in the right panel. Interface de PalmPlanner avec la sélection des paramètres d'entrée dans les onglets de gauche et le plan obtenu dans le panneau de droite. |
| In the text | |
![]() |
Fig. 2 Examples of designs generated with PalmPlanner. A) Double rows of oil palms planted following a quincunx design (intra-row = 9 m, inter-row = 7.8 m) and removing 1/3 oil palm row, intercropped with two cocoa rows following a quincunx design (intra-row = 3 m, inter-row = 3 m) and one row of bananas (intra-row = 9 m). B) Square oil palm design (intra-row = 9 m, inter-row = 9 m) on replanting area (quincunx; intra-row = 9 m, inter-row = 7.8 m) with cedar trees replacing oil palm on the edges of the plot. C) Oil palm quincunx design (intra-row = 12 m, inter-row = 8 m) with one annual crop (beans) within the row (intra-row = 1.5 m) and another one (maize) between rows of oil palm (intra-row = 2 m). Exemples de plans générés avec PalmPlanner. A) Double rangée de palmiers à huile plantés selon un schéma en quinconce (intra-rang = 9 m, inter-rang = 7,8 m) et suppression d'un tiers de la rangée de palmiers à huile, en association avec deux rangées de cacaoyers selon un schéma en quinconce (intra-rang = 3 m, inter-rang = 3 m) et une rangée de bananiers (intra-rang = 9 m). B) Disposition en carré des palmiers à huile (intra-rang = 9 m, inter-rang = 9 m) sur la zone de replantation (quinconce; intra-rang = 9 m, inter-rang = 7,8 m) avec des cèdres remplaçant les palmiers à huile sur les bords de la parcelle. C) Disposition en quinconce des palmiers à huile (intra-rang = 12 m, inter-rang = 8 m) avec une culture annuelle (haricots) dans la rangée (intra-rang = 1,5 m) et une autre (maïs) entre les rangées de palmiers à huile (intra-rang = 2 m). |
| In the text | |
Current usage metrics show cumulative count of Article Views (full-text article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 48-96 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.


