Skip to contents

This function downloads legacy NCCS data, filters it based on geography and NTEE codes, and merges it with NTEE metadata. BMF data can also be appended to Core data.

Usage

get_data(
  dsname = NULL,
  time = "2015",
  scope.orgtype = "NONPROFIT",
  scope.formtype = "PZ",
  geo.state = NULL,
  geo.city = NULL,
  geo.county = NULL,
  geo.region = NULL,
  ntee = NULL,
  ntee.group = NULL,
  ntee.code = NULL,
  ntee.orgtype = NULL,
  append.bmf = FALSE
)

Arguments

dsname

character scalar. Name of data series to query from S3. Valid inputs are either "core" or "bmf", not both.

time

character vector. Dates of core/bmf files to query. Valid inputs range from 1989-2022.

scope.orgtype

character scalar. Organization type to query from core/bmf s3 bucket. Valid inputs are 'CHARITIES' for charities (501C3-PC), 'PRIVFOUND' for private foundations (501C3-PF) and 'NONPROFIT' for all nonprofits (501CE)

scope.formtype

character scalar. Form type to query from core/bmf s3 bucket. Valid inputs are 'PC'(nonprofits that file the full version), 'EZ'(nonprofits that file 990EZs only), ' PZ'(nonprofits that file both PC and EZ), or 'PF'(private foundations).

geo.state

character vector. Filter query by state abbreviations e.g. "NY", "CA". Default == NULL includes all states.

geo.city

character vector. City names for filtering e.g. "Chicago", "montgomery". Case insensitive

geo.county

character vector. County names for filtering e.g. "cullman", "dale". Case insensitive.

geo.region

character vector. Regions for filtering e.g. "South", "Midwest" based on census region classifications.

ntee

character vector. Vector of user inputs. The user inputs are progressively filtered until group, code and orgtypes are sorted into separate vectors.

ntee.group

character vector. Specific Industry Group codes submitted by user

ntee.code

character vector. Specific level 2-4 codes (Industry, Division, Subdivision) submitted by user.

ntee.orgtype

character vector. Specific level 5 codes (Organization Type) submitted by user.

append.bmf

boolean. Option to merge queried core data with bmf data. Involves downloading the bmf dataset and will take longer. Default == FALSE.

Value

data.table with queried data