compare_mortgage
Compare mortgage lending metrics across multiple U.S. areas using HMDA data. View side-by-side summaries of denial rates, median loan amounts, and loan type breakdowns for tracts, counties, or states.
Instructions
Compare mortgage lending metrics across 2-5 geographic areas for a single HMDA data year. All areas must be the same geographic level (tract, county, or state). Returns side-by-side summaries including origination count, denial rate, median loan amount, and loan type/purpose breakdowns for each area. Source: CFPB/FFIEC HMDA.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | No | HMDA data year (default: most recent available) | |
| geoids | Yes | Array of 2-5 FIPS codes to compare | |
| area_type | Yes | Geographic level (must be same for all areas): tract (or census_tract), county, or state |