Skip to main content

Package for accessing CFPB U.S. home mortgage data

Project description

tidyhome: a package for accessing CFPB U.S. home mortgage data

What is tidyhome?

Tidyhome is a package that simplifies the process of retrieving Home Mortgage Disclosure Act (HMDA) data from the Consumer Financial Protection Bureau's (CFPB) HMDA Platform API.

The 'HMDA Platform API' refers to several APIs designed to handle various tasks. Of these APIs, tidyhome interacts with the 'Data Browser' API.

The goal of tidyhome is to allow users the option to circumnavigate making API requests in their web browser. The freedom to do so may prove useful to data scientists who are tasked with analyzing HMDA data.

Installation

Install tidyhome using:

pip install tidyhome

How to use tidyhome

Tidyhome contains several classes and functions that are designed to simplify and guide the process of making a valid API request.

Below is a brief overview of each class/function and an example of how tidyhome can be used.

Classes:

  • Race: an enumerated class containing races recorded as part of a home mortgage application or loan. To be used as input to a function's 'races' parameter to get data for only the races you specify.

  • Action: an enumerated class containing actions taken by lending institutions on the filed application or loan. To be used as input to a function's 'actions' parameter to get data for only the actions you specify.

Functions:

  • get_aggregations: returns a pandas DataFrame containing aggregate data of all loans reported.

  • get_loans: returns a pandas DataFrame containing all lending institutions that reported HMDA data.

  • get_institutions: returns a pandas DataFrame containing raw HMDA data on all individual loans reported.

Click here for more information regarding pandas, a powerful Python data analysis package.

Usage example:

>>> import tidyhome as th
>>> th.get_loans(2019, "dc", th.Action.INCOMPLETE, [th.Race.BLACK, th.Race.WHITE])

The above function call returns a DataFrame containing HMDA data on all individual loans in 2019 in DC where the file was closed for incompleteness and the reported races of applicants/borrowers were black or white.


Github Page: https://github.com/summitllc/tidyhome-py

Bug Tracking Page: https://github.com/summitllc/tidyhome-py/issues

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tidyhome-1.0.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tidyhome-1.0.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file tidyhome-1.0.0.tar.gz.

File metadata

  • Download URL: tidyhome-1.0.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for tidyhome-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e7af918a6349541e7b519d3f86e4d471716c84d22238beaeb17b3acfe10af0c6
MD5 0a4e94f87d8c2a061e47f13e47013e0f
BLAKE2b-256 4ac2132338bedd606bf3897aaedd79d2f324e7d107abfa01d1c74eba53f91e99

See more details on using hashes here.

File details

Details for the file tidyhome-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: tidyhome-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for tidyhome-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0eb79a0661c1a78cd26e657c784970ed8cd9503b0edaaf07776efd1d7aaddef4
MD5 91b508a86b35f7b15bac5ca06fdd4474
BLAKE2b-256 cd9cb91372e0d455e0522241f5976a606816c443ab1236fcbf8bebb36c66ca50

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page