Given a list returned by tsg_all_grants() or tsg_search_grants(), creates a tibble with all available variables. This tibble contains roughly 200 columns if all available grants are used (as of October 2019), due to differences in how grant data is labelled and structured.

tsg_process_data(x, min_coverage = 0, verbose = TRUE)

Arguments

x

A list of tibble with grant data returned by tsg_all_grants().

min_coverage

A number from 0 to 1. If >0, only returns variables with a value other than NA for at least that proportion of rows. Defaults to 0 and returns all columns.

verbose

If TRUE, prints console messages on data retrieval progress. Defaults to TRUE.

Value

A tibble with all variables from all provided grants.

See also

tsg_core_data(), which does the same processing but only returns the core variables in the 360Giving standard.

Examples

if (FALSE) {
grants <- tsg_all_grants()

df1 <- tsg_process_data(grants)

# Only return data from columns with more than 50% coverage
df2 <- tsg_process_data(grants, min_coverage = 0.5)
}