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.

Tidyhome's classes are designed to be passed as arguments to the :races: and :actions: parameters of tidyhome's functions.

Tidyhome's functions use the arguments passed in function call parameters as the arguments passed in the API request it makes.

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. You can use these 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. You can use these 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:

>>> tidyhome.get_loans(2019, "dc", [tidyhome.Action.INCOMPLETE, tidyhome.Action.PREAPPROVED], [tidyhome.Race.BLACK, tidyhome.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 or the loan was preapproved, 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.1.tar.gz (8.8 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.1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tidyhome-1.0.1.tar.gz
  • Upload date:
  • Size: 8.8 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.1.tar.gz
Algorithm Hash digest
SHA256 064d8907da41baca4762943969175bd97f203fe4a7cf50146ef911510e0835d4
MD5 d05bb7740145c3ed592e03d9f47da013
BLAKE2b-256 40d9836fd57fa878286c83bb217f65095a2224ce6adb3f75c8a3d54c8023cbdb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tidyhome-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 05e1ef3b5277ba9ceb824ab9a0164dda99f4a0a33b5c87b0388512b190a6be17
MD5 fa4effcf907c429d8b7df5339fe28f81
BLAKE2b-256 92658f103c0126587bc805abe8fc7104d00d29efe48db3be95ed95e7ca76436f

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