fdic_failures: FDIC API Query for Failure Information

fdic_failuresR Documentation

FDIC API Query for Failure Information

Description

A class to create Failure queries to the FDIC API. Derived from class fdic_base.

Details

Example filters

  • Filter by Location: CITYST:"MEMPHIS, TN"

  • Filter by institution fail year range: FAILYR:["2015" TO "2016"]

Example fields: NAME,CERT,FIN,CITYST,FAILDATE,SAVR,RESTYPE,RESTYPE1,QBFDEP,QBFASSET,COST Example sort_by: FAILDATE

Value

an object of type fdic_sod

an object containing metadata and a data.frame

Total_Params

total_fields

Fields to sum up (in a totals response object). Only numeric columns are valid.

subtotal_by

The field by which data will be subtotaled (in totals response object). Only categorical values should be used.

Total_Usage

fdic_failures$setTotal_fields(total_fields)
fdic_failures$setSubtotal_by(subtotal_by)

Params

field

one of the available query fields returned by get_available_fields

filters

the filter for the bank search.

fields

Comma delimited list of fields to search

sort_by

Field name by which to sort returned data

sort_order

Indicator if ascending (ASC) or descending (DESC)

limit

The number of records to return. Default is 10 and maximum is 10,000.

offset

The offset of page to return

Aggregate_Params

agg_by

The field(s) by which data will be aggregated. Valid values are 'YEAR' or 'YEAR,STNAME'.

agg_term_fields

The field(s) for which aggregations will be counted for each unique term.

agg_sum_fields

The field(s) for which aggregations will be summed or aggregated.

agg_limit

The limit on how many aggregated results will be displayed

Usage

fdic_base$get_available_fields()

Get the fields available for queries

fdic_base$get_available_field_description(field)

Get the description of a field

fdic_base$setFilters(filters)
fdic_base$setFields(fields)
fdic_base$setSort_by(sort_by)
fdic_base$setSort_order(sort_order)
fdic_base$setLimit(limit)
fdic_base$setOffset(offset)

Aggregate_Usage

fdic_locations$setAgg_by(agg_by)
fdic_locations$setAgg_term_fields(agg_term_fields)
fdic_locations$setAgg_sum_fields(agg_sum_fields)
fdic_locations$setAgg_limit(agg_limit)

Super class

fdic.api::fdic_base -> fdic_failures

Methods

Public methods

Inherited methods

Method new()

Initialization Method

Usage
fdic_failures$new()

Method query_fdic()

Query FDIC API

Usage
fdic_failures$query_fdic()

Method setAgg_by()

Field by which the data will be aggregated

Usage
fdic_failures$setAgg_by(agg_by)
Arguments
agg_by

field to aggregate by


Method setAgg_term_fields()

Fields for which aggregations will be counted

Usage
fdic_failures$setAgg_term_fields(agg_term_fields)
Arguments
agg_term_fields

field to aggregate by


Method setAgg_sum_fields()

Fields for which aggregations will be summed

Usage
fdic_failures$setAgg_sum_fields(agg_sum_fields)
Arguments
agg_sum_fields

field to aggregate by


Method setAgg_limit()

limit on how many aggregated fields will be displayed

Usage
fdic_failures$setAgg_limit(agg_limit)
Arguments
agg_limit

aggregation limits


Method setTotal_fields()

Fields to sum up

Usage
fdic_failures$setTotal_fields(total_fields)
Arguments
total_fields

fields to sum


Method setSubtotal_by()

Field by which the data will be subtotaled

Usage
fdic_failures$setSubtotal_by(subtotal_by)
Arguments
subtotal_by

field to subtotal by


Method clone()

The objects of this class are cloneable with this method.

Usage
fdic_failures$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

References

https://banks.data.fdic.gov/docs/

Examples

if (curl::has_internet()) {
  x <- fdic_failures$new()
  x$get_available_fields()
  x$get_available_field_description("FAILDATE")
}

bertcarnell/fdic.api documentation built on June 18, 2024, 3:19 a.m.