Skip to contents

Computes the slope of the linear regression of funding over time for each destination. Goal: Detects whether funding to a destination is increasing or decreasing over time.

Usage

indicator_destination_funding_trend(flows, destinations_df = NULL)

Arguments

flows

A dataframe with destinationObjects, budgetYear, and amountUSD.

destinations_df

(optional) A dataframe of destinations to merge results with.

Value

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

Examples

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