Fundraising Events Revenue Ratio
Source:R/get-revenue-fundevents-ratio.R
get_revenue_fundevents_ratio.RdFundraising event contributions as a share of total revenue.
Formula:
revenue_fundevents = fundraising_event_revenue / total_revenueDefinitional Range
Bounded [0, 1]. Zero means none of this revenue type was received; one means this channel accounted for all total revenue.
Calculated For: 990 filers only.
Usage
get_revenue_fundevents_ratio( df,
fundraising_event_revenue = "F9_08_REV_CONTR_FUNDR_EVNT",
total_revenue = "F9_08_REV_TOT_TOT",
winsorize = 0.98 ,
range = "zo",
sanitize = TRUE,
summarize = FALSE )Arguments
- df
A
data.framecontaining the fields required for computing the metric.- fundraising_event_revenue
Gross revenue from fundraising events.
- total_revenue
Total revenue.
- winsorize
Winsorization proportion between 0 and 1 (default
0.98).- range
Character string specifying the theoretical range of the ratio, used to set winsorization bounds. Default
"zo". Options:"np"(negative to positive),"zp"(zero to positive),"zo"(zero to one),"nz"(negative to zero), or a custom"lo;hi"pair (e.g."0;10").- sanitize
Logical (default
TRUE). IfTRUE, imputes zero for NA financial fields before computing, respecting form scope.- summarize
Logical (default
FALSE). IfTRUE, prints summary statistics and density plots for all four output columns.
Value
The original data.frame with four new columns:
revenue_fundevents(raw ratio)revenue_fundevents_w(winsorized)revenue_fundevents_z(z-score)revenue_fundevents_p(percentile rank, 1-100)
Details
Revenue Fundevents Ratio - Revenue composition measure
Formula: fundraising event revenue / total revenue. Bounded [0, 1].
Fundraising events (galas, walks, auctions) generate contributed revenue but typically carry high direct expenses. This ratio measures gross event revenue as a share of total revenue; net event income after direct expenses is reported elsewhere.
Examples
library( fiscal )
data( dat10k )
d <- get_revenue_fundevents_ratio( df = dat10k )
#> Error in resolve_col(dt, fundraising_event_revenue): None of the specified columns were found in the data: F9_08_REV_CONTR_FUNDR_EVNT
head( d[ , c( "revenue_fundevents", "revenue_fundevents_w", "revenue_fundevents_z", "revenue_fundevents_p" ) ] )
#> Error: object 'd' not found