
Plot Finn Cycling Index evolution and period comparison
Source:R/circularity_index.R
plot_finn_circularity.RdCreates three panels: (a) temporal evolution of mean FCI per typology with interquartile ribbon; (b) FCI distribution at four key periods as boxplots; (c) net change in mean FCI from first to last period.
Usage
plot_finn_circularity(
periods = c(1860, 1920, 1960, 2010),
finn_data = NULL,
n_prov_destiny = NULL,
typologies = NULL
)Arguments
- periods
Integer vector of years to mark as dashed reference lines on the
evolutionpanel. Theperiodsandchangepanels always compare the four fixed historical eras (1860-1870, 1920-1930, 1960-1970, 2010-2020) regardless of this argument.- finn_data
Pre-computed tibble from
create_finn_indicator(). IfNULL, computed automatically (slow).- n_prov_destiny
Passed to
create_finn_indicator()whenfinn_dataisNULL.- typologies
Typology assignment per year and province, with columns
year,province_nameandTypology_base. IfNULL, derived fromcreate_typo_ts_plot().
Examples
# `periods` must name years present in the data.
finn_data <- tibble::tribble(
~year, ~province_name, ~finn_index,
1960, "A", 0.12,
1960, "B", 0.18,
2000, "A", 0.07,
2000, "B", 0.09
)
typologies <- tibble::tribble(
~year, ~province_name, ~Typology_base,
1960, "A", "Specialized cropping systems (intensive)",
1960, "B", "Semi-natural agroecosystems",
2000, "A", "Specialized cropping systems (intensive)",
2000, "B", "Semi-natural agroecosystems"
)
plots <- plot_finn_circularity(
periods = c(1960, 2000),
finn_data = finn_data,
typologies = typologies
)