Skip to contents

Estimates the linear growth (slope) of annual funding amounts from each donor to recipient.

Usage

indicator_donor_recipient_funding_growth(
  flows,
  donor_recipient_pairs = NULL,
  donors = NULL,
  recipient_name = NULL
)

Arguments

flows

A dataframe containing sourceObjects, destinationObjects, budgetYear, amountUSD.

donor_recipient_pairs

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

donors

(optional used if recipient_name is provided ) A dataframe with donor names to merge with the results.

recipient_name

(optional) the name of a specific recipient to filter the results of the function

Value

A list with a tibble with donor, recipient, and Funding_Growth_Trend and a plot.

Examples

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