Skip to contents

shiny_fude() prepares a Shiny user interface and server function for interactive visualization of Fude Polygon data with leaflet and DT. The map supports polygon selection, optional agricultural community boundary overlays, and a linked attribute table.

Usage

shiny_fude(data, height = 1000, rcom = FALSE)

Arguments

data

An sf::sf() object, a list of layers from read_fude(), or a result from combine_fude(). Polygon layers must contain polygon_uuid and have a defined coordinate reference system. To display boundaries, supply the combined result or a list with fude and rcom elements.

height

Height of the map passed to leaflet::leafletOutput().

rcom

Logical. If TRUE, overlay agricultural community boundaries on the map.

Value

A list with two elements: ui, a Shiny UI object, and server, a Shiny server function.

Details

Click a parcel to toggle its selection or select a row in the table to highlight one parcel. The table shows the selected parcels, or all parcels when the selection is empty. Use the Clear button to reset the selection. Selection updates preserve the current map view.