Visualise the relative proportion of plankton functional groups averaged across all samples. Useful for summarising community composition in a simple, accessible format.
pr_plot_PieFG(df)A dataframe from pr_get_FuncGroups() containing functional group
abundance or biomass data
A ggplot2 object that can be further customised or saved with ggsave()
The pie chart shows:
Each functional group as a wedge
Wedge size proportional to mean abundance/biomass across all samples
Colours from the "Set1" palette for clear distinction
Legend below plot listing all functional groups
This plot provides a quick overview of which functional groups dominate the plankton community on average. Use this for:
Initial data exploration
Comparing overall community structure between surveys or regions
Educational presentations requiring simple visualisations
Shows average composition only, hiding temporal variability
Cannot show changes over time (use pr_plot_tsfg() for that)
Works best with 5-10 functional groups; too many makes wedges hard to distinguish
pr_get_FuncGroups() to generate input data
pr_plot_tsfg() for time series of functional group composition
# Phytoplankton functional groups from CPR
df <- pr_get_FuncGroups("CPR", "Phytoplankton")
plot <- pr_plot_PieFG(df)
print(plot)
# Zooplankton functional groups from NRS
df <- pr_get_FuncGroups("NRS", "Zooplankton")
pr_plot_PieFG(df)
# Save to file
df <- pr_get_FuncGroups("CPR", "Zooplankton")
p <- pr_plot_PieFG(df)
ggplot2::ggsave("functional_groups_pie.png", p, width = 8, height = 6)