Skip to contents

Calculates the proportion of years in which a donor provided funding relative to the total number of years analyzed.

Usage

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

Arguments

flows

A dataframe containing FTS-style flow data with sourceObjects, budgetYear, 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 columns donor and Funding_Consistency_Index and a plot.

Examples

result <- indicator_donor_funding_consistency(flows, donor_name = "Germany")
print(result$plot)
#> `stat_bin()` using `bins = 30`. Pick better value `binwidth`.