R Shiny in Agriculture - Top 5 Dashboard Examples

Reading time:
time
min
By:
Dario Radečić
May 31, 2022

R Shiny is a no-brainer dashboarding choice for companies and individuals. There are thousands of Shiny dashboards in production today in every sector you can imagine - agriculture being no exception. Today we bring you 5 dashboard examples of R Shiny in agriculture. We'll show you what's possible using Shiny and how you can start today! Shiny is approachable with a lot of documentation, which makes it easy for developers and researchers to produce impressive results, even without coding backgrounds. It's easy to build a Proof of Concept app and begin sharing your insights with colleagues and customers. The dashboards you see today span from simple statistical analysis tools to full-scale soil profile analysis, and everything in between. Continue below to see examples of how interactive Shiny dashboards can be used in your <em>field</em>. <blockquote>Agriculture not your cup of tea? <a href="https://appsilon.com/r-shiny-in-life-sciences-examples/" target="_blank" rel="noopener">Here are 7 R Shiny dashboards in life sciences</a>.</blockquote> Here's a list of the top 5 dashboards made with R Shiny in agriculture: <ul><li><a href="#soilprofile">Soilprofile by Gabriel Holz</a></li><li><a href="#pasture">Pasture Potential tool by DairyNZ</a></li><li><a href="#mazeyield">Agricultural Productivity in Tanzania by EPAR</a></li><li><a href="#viscover">Viscover by RStudio</a></li><li><a href="#grapesAgri1">GrapesAgri1 by Kerala Agricultural University</a></li></ul> <hr /> <h2>Shiny Dashboard Examples in Agriculture</h2> <h3 id="soilprofile">Soilprofile by Gabriel Holz</h3> The Soilprofile dashboard is based around the <code>soilprofile2</code> R package. It provides a graphical representation of soil horizons, like the image below representing the master horizons and transitional horizon by color. <img class="size-full wp-image-12935" src="https://webflow-prod-assets.s3.amazonaws.com/6525256482c9e9a06c7a9d3c%2F65b7d3eba6541c6fef53dadf_c4f1e7b1_1-2.webp" alt="Image 1 - Soilprofile R Shiny dashboard" width="2808" height="2112" /> Image 1 - Soilprofile R Shiny dashboard The main focus of graphically representing soil horizons is to gain insights from properties such as horizon transitions, texture, structure, root density, and rock content. It allows users to quickly identify and interpret the soil profile through visualizations. The dashboard allows you to use default data or upload your own. All the charts are updated accordingly. The home page of the dashboard even contains a section with the source code which you can download and modify per your liking. Learn more: <ul><li><a href="https://nardus.shinyapps.io/soilprofile/" target="_blank" rel="noopener">View the Soilprofile dashboard</a></li><li><a href="https://nardus.shinyapps.io/soilprofile/" target="_blank" rel="noopener">Source code</a> (under Codes)</li></ul> <h3 id="pasture">Pasture Potential tool by DairyNZ</h3> The Pasture Potential Tool shows dairy farmers the amount of pasture eaten on comparable farms in their district, and also provides them with a target to improve their profitability and environmental footprint. <img class="size-full wp-image-12937" src="https://webflow-prod-assets.s3.amazonaws.com/6525256482c9e9a06c7a9d3c%2F65b7d3eba6541c6fef53db6f_fbfa649d_2-2.webp" alt="Image 2 - Posture Potential Tool R Shiny dashboard" width="2808" height="2112" /> Image 2 - Posture Potential Tool R Shiny dashboard To start, you have to enter your address or zoom in and drop a pin on the map. The colored areas on the map show where more data is available. Then, you have to choose the season and select the characteristics of your farm from the dropdown menu. Finally, you'll be presented with the map and graphs to find the potential, the pasture, and crop eaten that the top 10% of farmers have exceeded in the selected areas. The "pasture eaten" graphs use DairyBase data. Not all farms are enrolled in this database, so data in some areas may be limited. Learn more: <ul><li><a href="https://www.dairynz.co.nz/feed/improving-pasture-performance/pasture-potential-tool/" target="_blank" rel="noopener">View the Pasture Potential dashboard</a></li><li><a href="https://shiny.rstudio.com/gallery/dairy-farms.html" target="_blank" rel="noopener">Info page</a></li><li><a href="https://github.com/woodwards/pasture_potential" target="_blank" rel="noopener">Source code</a></li></ul> <h3 id="mazeyield">Agricultural Productivity in Tanzania by EPAR</h3> The EPAR (Evans School Policy Analysis &amp; Research Group) research aims to answer the question of how is maize yield related to farm management decisions and household characteristics in Tanzania. <img class="size-full wp-image-12939" src="https://webflow-prod-assets.s3.amazonaws.com/6525256482c9e9a06c7a9d3c%2F65b7d3ec2a88faf6f30d8b62_9dccfb34_3-2.webp" alt="Image 3 - Agricultural productivity in Tanzania dashboard" width="2812" height="2098" /> Image 3 - Agricultural productivity in Tanzania dashboard The group aims to answer this question by investigating how a farmer who experiences an increase in maize yield from one year to the next is expected to respond in terms of on-farm and off-farm livelihood practices. There are two options: the farmer could either specialize increasingly in maize cultivation or hold the production volume constant and shift time and labor resources into other activities. The R Shiny dashboard is based on the World Bank's <a href="http://econ.worldbank.org/WBSITE/EXTERNAL/EXTDEC/EXTRESEARCH/EXTLSMS/0,,contentMDK:23512006~pagePK:64168445~piPK:64168309~theSitePK:3358997,00.html" target="_blank" rel="noopener">Living Standards Measurement Study - Integrated Surveys on Agriculture</a> dataset for seven countries in Sub-Saharan Africa. The app displays cleaned data from three panels of the Tanzania National Panel Survey. Learn more: <ul><li><a href="https://epar.shinyapps.io/godan_app/" target="_blank" rel="noopener">View the EPAR dashboard</a></li><li><a href="https://epar.evans.uw.edu/agricultural-productivity-tanzania" target="_blank" rel="noopener">Info page</a></li><li><a href="https://github.com/EvansSchoolPolicyAnalysisAndResearch/AgProductivityApp/tree/master/Shiny_app_R/github_app" target="_blank" rel="noopener">Source code</a></li></ul> <h3 id="viscover">Viscover by RStudio</h3> The Viscover dashboard is designed for interacting with Cropland Data Layer (CDL) and Soil Data Layer (SDL). <img class="size-full wp-image-12941" src="https://webflow-prod-assets.s3.amazonaws.com/6525256482c9e9a06c7a9d3c%2F65b7d3ed72e6d8808efb8fa4_bd4297ac_4-2.webp" alt="Image 4 - Viscover R Shiny dashboard" width="2674" height="2292" /> Image 4 - Viscover R Shiny dashboard If you're not familiar with the terms, here's a crash course: <b>CDL</b> is a geo-referenced crop-specific land cover data, created annually for the contiguous United States since 2008. <b>SDL</b> contains tabular and spatial soil information available for the United States and the Territories. This Shiny dashboard provides a user-friendly interface to interact with publicly available, Federal data from different sources and allows users to make cross-references through the overlay operation. Learn more: <ul><li><a href="https://lyux.shinyapps.io/viscover/" target="_blank" rel="noopener">View the Viscover dashboard</a></li><li><a href="https://shiny.rstudio.com/gallery/viscover.html" target="_blank" rel="noopener">Info page</a></li><li><a href="https://github.com/XiaodanLyu/viscover" target="_blank" rel="noopener">Source code</a></li></ul> <h3 id="grapesAgri1">GrapesAgri1 by Kerala Agricultural University</h3> The last dashboard on the list isn't technically a dashboard. Instead, it's an R package that's a collection of 6 Shiny apps for agricultural research data analysis. <img class="size-full wp-image-12943" src="https://webflow-prod-assets.s3.amazonaws.com/6525256482c9e9a06c7a9d3c%2F65b7d3ee00fd9b7af13367aa_6465c112_5-2.webp" alt="Image 5 - GrapesAgri1 ttApp (compare means) dashboard" width="2674" height="2294" /> Image 5 - GrapesAgri1 ttApp (compare means) dashboard The <code>grapesAgri1</code>, or General R-shiny-based Analysis Platform Empowered by Statistics for data analysis in Agriculture-part1, is a collection of R Shiny apps for some basic statistical analysis used in agricultural research. Like most non-technical users, ag specialists prefer graphical user interfaces to command-line tools. In this case, Shiny was a great tool for Kerala Agricultural University to bridge the gap between user preferences and data handling. From the R console, you can use the following command to install the package: <pre>install.packages('grapesAgri1', dependencies=TRUE) </pre> Once installed, you'll have access to six dashboards, ranging in complexity from descriptive statistics to randomized block design. Here are the commands you can use to start each dashboard: <pre>grapesAgri1::descApp() # descriptive Statistics and Visualization grapesAgri1::corrApp() # Correlation Analysis grapesAgri1::ttApp() # Compare Means grapesAgri1::crdApp() # Completely Randomized Design grapesAgri1::layoutApp() # Field layout of experiments grapesAgri1::rbdApp() # Randomized Block Design </pre> Each dashboard has extensive <a href="https://github.com/pratheesh3780/grapesAgri1#further-reading" target="_blank" rel="noopener">documentation</a> behind it, so make sure to read it if you find some part of the app confusing. Learn more: <ul><li><a href="https://cran.r-project.org/web/packages/grapesAgri1/grapesAgri1.pdf" target="_blank" rel="noopener">Package description</a></li><li><a href="https://github.com/pratheesh3780/grapesAgri1" target="_blank" rel="noopener">Source code</a></li></ul> <hr /> <h2>Summary of R Shiny in Agriculture</h2> Today you've seen five examples of dashboards built with R Shiny in agriculture, and that's only the tip of the iceberg. Most dashboards in this field are owned by corporations and research institutions, which makes them accessible only to a handful of people. <blockquote>Unsure about adopting R Shiny in your business? <a href="https://appsilon.com/why-you-should-use-r-shiny-for-enterprise-application-development/" target="_blank" rel="noopener">Here's what we've learned by helping Fortune 500s develop enterprise Shiny apps</a>.</blockquote> If your field can benefit from data analysis and data science, it can benefit from interactive dashboards. R Shiny has everything needed for businesses and individuals to either automate or simplify their day job. ODAPES is a perfect example of Shiny being used to <a href="https://www.youtube.com/watch?v=t33IITZR6V4" target="_blank" rel="noopener">open source 'Digital Agronomy.'</a> With Shiny, ODAPES is able to create a centralized platform for farmers, cutting out costly digital services, and simplifying data access for users. Ultimately, putting precision agriculture into the hands of the farmers. <blockquote>Do you work in a public sector? <a href="https://appsilon.com/r-shiny-in-government-examples/" target="_blank" rel="noopener">Here's our curated list of 7 R Shiny dashboards in Government</a>.</blockquote> <h3>How to begin building your Shiny dashboard</h3> If you're looking to build your first R Shiny dashboard, you can use <a href="http://templates.appsilon.com/" target="_blank" rel="noopener">Appsilon Shiny Dashboard Templates</a> to simplify the process. The bundle contains a ton of beautiful and easy-to-use templates. The best part - is it's entirely free. In case you need something more advanced, we're also here to help. <a href="https://appsilon.com/" target="_blank" rel="noopener">Appsilon</a> is an <a href="https://appsilon.com/appsilon-is-an-rstudio-full-service-certified-partner/" target="_blank" rel="noopener">RStudio Full Service Certified Partner</a>. We develop advanced R Shiny applications for Fortune 500 companies across the globe. We'd be happy to help you choose the right options for your use case. <a href="https://appsilon.com/#contact" target="_blank" rel="noopener">Let's talk</a> and see how Shiny can help you grow.

Have questions or insights?

Engage with experts, share ideas and take your data journey to the next level!

Is Your Software GxP Compliant?

Download a checklist designed for clinical managers in data departments to make sure that software meets requirements for FDA and EMA submissions.
Explore Possibilities

Share Your Data Goals with Us

From advanced analytics to platform development and pharma consulting, we craft solutions tailored to your needs.

Talk to our Experts
community
rstudio
r
r community