Skip to contents

Evaluates whether a donor's destination concentration (HHI) is increasing or decreasing over time. Goal: Captures whether a donor’s portfolio is becoming more or less geographically diversified over time (trend in HHI per year).

Usage

indicator_donor_destination_trend(flows, donor_dest_df = NULL)

Arguments

flows

A dataframe with sourceObjects, destinationObjects, budgetYear, and amountUSD.

donor_dest_df

(optional) A dataframe of donor–destination pairs to merge results with.

Value

A list with a tibble with donor, DonorDestination_Focus_Trend (slope) and a plot.

Examples

result <- indicator_donor_destination_trend(flows)
print(result$plot)
#> `stat_bin()` using `bins = 30`. Pick better value `binwidth`.
#> Warning: Removed 146 rows containing non-finite outside the scale range (`stat_bin()`).