Skip to contents

Computes a weighted average earmarking flexibility index per destination (Unearmarked = 1.0, Softly earmarked = 0.75, Earmarked = 0.5, Tightly earmarked = 0.25).

Usage

indicator_destination_earmarking_flexibility(flows, destinations = NULL)

Arguments

flows

A dataframe with destinationObjects, amountUSD, and grandBargainEarmarkingType.

destinations

Optional dataframe to merge.

Value

A list with a tibble with destination and Earmarking_Flexibility and a plot.

Examples

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