Skip to contents

[Experimental]

Takes a tibble of iNaturalist occurrences enriched with establishment means and EU directive information, and produces a donut chart showing the proportion of species assigned to each conservation category. Each species is assigned to exactly one category following a fixed priority order: Alien (IAS) > Habitats Directive > Birds Directive > Other.

Usage

obs_pie_chart(df)

Arguments

df

An sf tibble of iNaturalist occurrences containing at least the columns:

name

character. Scientific name.

directive

character. EU directive name, produced by add_eunis_legal_to_occ.

establishmentMeans

list-column of tibbles with a nativeness field, produced by add_nativeness_to_occ.

Value

A ggplot object printed to the active device. The total number of species is displayed at the centre of the donut. Category counts and percentages are shown in the legend.

Note

Species are assigned to one category only, in order of priority:

  1. Alien (IAS) — nativeness == "introduced"

  2. Habitats Directive — directive contains "Habitats"

  3. Birds Directive — directive contains "Birds"

  4. Other — all remaining species

A species meeting multiple criteria will appear only in the highest-priority category.

Author

Alessandro Oggioni, PhD alessandro.oggioni@cnr.it

Alice Lenzi, phD alice.lenzi@crea.gov.it

Examples

if (FALSE) { # \dontrun{
obs_pie_chart(occ_eLTER_legal)
} # }