fdic_summary: FDIC API Query for Summary Information

fdic_summaryR Documentation

FDIC API Query for Summary Information

Description

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

Details

Example filters

  • Filter by Community Banks (CB) vs. Savings Institutions (SI)

  • Filter by State name: STNAME:"Virginia"

  • Filter for any one of multiple State names: STNAME:("West Virginia","Delaware")

  • Filter data by the year range: YEAR:["2015" TO "2017"]

  • Filter for data in Alabama in 2005: STNAME:"Alabama" AND YEAR:2005

Example fields: STNAME,YEAR,INTINC,EINTEXP,NIM,NONII,NONIX,ELNATR,ITAXR,IGLSEC,ITAX,EXTRA,NETINC Example sort_by: YEAR

Value

an object of type fdic_sod

an object containing metadata and a data.frame

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_summary

Methods

Public methods

Inherited methods

Method new()

Initialization Method

Usage
fdic_summary$new()

Method query_fdic()

Query FDIC API

Usage
fdic_summary$query_fdic()

Method setAgg_by()

Field by which the data will be aggregated

Usage
fdic_summary$setAgg_by(agg_by)
Arguments
agg_by

field to aggregate by


Method setAgg_term_fields()

Fields for which aggregations will be counted

Usage
fdic_summary$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_summary$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_summary$setAgg_limit(agg_limit)
Arguments
agg_limit

aggregation limits


Method setMax_value()

the field by which the max value is desired

Usage
fdic_summary$setMax_value(max_value)
Arguments
max_value

the max value field.


Method setMax_value_by()

the field that will be used to determine the unique records

Usage
fdic_summary$setMax_value_by(max_value_by)
Arguments
max_value_by

the max value field.


Method clone()

The objects of this class are cloneable with this method.

Usage
fdic_summary$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_summary$new()
  x$get_available_fields()
  x$get_available_field_description("INTINC")
}

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