detect_nonprofit: Match messy text and email data to nonprofit organizations

Description Usage Arguments Examples

View source: R/detect_nonprofit.R

Description

This function standardizes messy text data and/or email information to nonprofit organizations. The detect_nonprofit() function iterates through email domains and unstructured text to match patterns in our curated dictionaries to standardize nonprofit organizations. This tool is designed to optimize pattern detection for in the linkage of multiple datasets, for bibliometric analysis, and for sector classification in social, economic, and policy analysis.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
detect_nonprofit(
  data,
  id,
  input,
  output,
  email = FALSE,
  country = FALSE,
  parent_org = FALSE,
  org_type = FALSE
)

Arguments

data

A data frame or data frame extension (e.g. a tibble).

id

A numeric or character vector unique to each entry.

input

Character vector of messy or unstructured text that will be matched to nonprofit organizations.

output

Output column to be created as string or symbol.

email

Optional character vector of email or email domain information. Defaults to FALSE.

country

Optional parameter that returns country of organization when available. Defaults to FALSE.

parent_org

Optional parameter that returns the parent organization when available. For the nonprofit sector, this value defaults to FALSE.

org_type

Optional parameter that returns organization type when available.

Examples

1
2
3
4
5
6
library(tidyverse)
library(tidyorgs)
data(github_users)

classified_users <- github_users %>%
  detect_nonprofit(login, company, organization, email, parent_org, org_type)

brandonleekramer/tidyorgs documentation built on Dec. 19, 2021, 11:42 a.m.