Skip to contents

This indicator measures how consistently a donor provides funding across the months of the year, based on the transaction-level date field of FTS flows. It evaluates the dispersion of monthly funding shares and scales the result to a 0–1 index where higher values represent more regular and predictable timing of contributions.

Usage

indicator_donor_timing_consistency(flows, donors = NULL, donor_name = NULL)

Arguments

flows

A dataframe containing sourceObjects, budgetMonth (1–12), and amountUSD.

donors

Optional dataframe with donor names to merge results.

donor_name

Optional donor name to highlight in the plot.

Value

A list with a tibble with donor and Timing_Consistency (1 = very consistent, 0 = erratic) and a plot.

Examples

result <- indicator_donor_timing_consistency(flows, donor_name = "Germany")
print(result$plot)
#> Warning: Removed 106 rows containing non-finite outside the scale range (`stat_bin()`).