Skip to contents

Computes how concentrated a donor's funding portfolio is across destinations, using the Herfindahl–Hirschman Index (sum of squared funding shares).

Usage

indicator_donor_destination_concentration(flows, donor_dest_df = NULL)

Arguments

flows

A dataframe with sourceObjects, destinationObjects, 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_Concentration_Index (0=diverse, 1=concentrated) and a plot.

Details

Goal: Quantifies how concentrated (vs diversified) a donor’s funding portfolio is across destinations using the Herfindahl–Hirschman Index (HHI).

Examples

result <- indicator_donor_destination_concentration(flows)
print(result$plot)
#> `stat_bin()` using `bins = 30`. Pick better value `binwidth`.