R Shiny dashboard for monitoring termite attack patterns across maize FRN trials in Kenya , with stage-by-stage vigour and population loss tracking, variety attack inference, and a trial location map.
# Termite FRN Dashboard
> **R Shiny dashboard and geospatial mapping tool for monitoring termite Farmer Research Network (FRN) trials across western Kenya** — tracking termite attack patterns, crop vigour, and plant population loss across four growth stages with interactive filtering and variety-level attack analysis.
---
## Table of Contents
- Overview
- Project Structure
- Features
- Data Sources
- Prerequisites
- Installation
- Usage
- Dashboard Tabs
- Map Outputs
---
## Overview
This project supports field monitoring of a **termite research trial** across smallholder maize farms in western Kenya. Farmers plant side-by-side plots of hybrid and local maize varieties, and field officers collect data at four crop growth stages — First Weeding, Second Weeding, Tasseling, and Harvesting.
The dashboard visualizes termite attack patterns, crop vigour scores, population reduction, and termite species locations across those stages. A dedicated **Variety Attack tab** infers whether attacks affected hybrid or local maize plots and computes attack rates per variety.
A companion **static map script** produces a figure showing trial site locations across Kenya, with organization-specific county insets at sub-county resolution.
---
## Project Structure
```
Termite_FRN/
├── app.R # Shiny dashboard (main application)
├── map.R # Static ggplot2 + cowplot map script
│
├── Data/
│ └── Longrains_Termite_FRN_Data_2025.xlsx # Main dataset (multi-sheet)
│ ├── Farmer_Profile # Farmer demographics
│ ├── Trial_setup # Plot setup, varieties, geolocation
│ ├── First_Weeding # Stage 1 observations
│ ├── Second_Weeding # Stage 2 observations
│ ├── Tasseling_Stage # Stage 3 observations
│ └── Harvesting_Stage # Stage 4 observations
│
└── outputs/
└── Kenya_Termite_FRN_P …