ETL pipeline for US Treasury CDFI Fund public datasets — TLR, CLR, ILR, NMTC, and Awards data
Project description
cdfi-data 🏦
ETL pipeline for US Treasury CDFI Fund public datasets.
Download, clean, and analyze Transaction Level Report (TLR), Consumer Loan Report (CLR), and Awards data from the US Department of Treasury's CDFI Fund — in one line of Python.
Why cdfi-data?
The CDFI Fund releases massive public datasets covering millions of loans and investments in low-income communities. But the raw files are messy, inconsistently formatted, and require significant cleaning before analysis. cdfi-data standardizes the entire pipeline.
Installation
pip install cdfidata
Quickstart
from cdfidata import TLRLoader, CLRLoader, AwardsLoader
# Load TLR transaction data (downloads & caches automatically)
tlr = TLRLoader()
df = tlr.load(year=2022)
# Filter to Illinois
il = tlr.filter_state("IL")
# Filter by loan type and amount
small_biz = tlr.filter_loan_type("Business")
large = tlr.filter_amount(min_amount=500_000)
# Summary stats
tlr.summary()
# Export
tlr.to_csv("cdfi_transactions.csv")
tlr.to_sqlite("cdfi.db", table="tlr")
Sample Data (No Download Required)
from cdfidata import TLRLoader, CLRLoader, AwardsLoader
tlr = TLRLoader()
df = tlr.load_sample(n=1000)
clr = CLRLoader()
df = clr.load_sample(n=1000)
awards = AwardsLoader()
df = awards.load_sample(n=500)
Datasets Supported
- TLR (Transaction Level Report) — 1M+ individual CDFI loans, 61 variables
- CLR (Consumer Loan Report) — 3.2M consumer loans aggregated to census tract
- Awards Database — all CDFI Fund program awardees across all years
Coming soon: ILR (Institution Level Report), NMTC Allocatee data
Data Source
All data comes directly from the US Department of Treasury CDFI Fund: https://www.cdfifund.gov/research-data
Data is released annually under open government data principles.
Running Tests
PYTHONPATH=. pytest tests/ -v
30 tests across all modules.
Who This Is For
- Impact investors analyzing CDFI loan portfolios
- Academic researchers studying community development finance
- Policy analysts evaluating CDFI Fund program outcomes
- CDFIs benchmarking their own performance against peers
- Anyone who needs clean, analysis-ready CDFI Fund data
License
MIT 2026 Jaypatel1511
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cdfidata-0.1.1.tar.gz.
File metadata
- Download URL: cdfidata-0.1.1.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4d0c152dfbb411889109b676aca9915743db0aa5219d1195f1e27e2ac8f63f0
|
|
| MD5 |
d2b6b4c5da2ee1e705cb9a65648925b0
|
|
| BLAKE2b-256 |
6c2dbd37374f2f1867495ae485d51df6908b9c1bad065325082ffcf8aee24a53
|
File details
Details for the file cdfidata-0.1.1-py3-none-any.whl.
File metadata
- Download URL: cdfidata-0.1.1-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6afd1859cb3bb6ef47f0af05427b729460d1853f8b6c63f1d35e90baa4610196
|
|
| MD5 |
10404d4405c9f46141e2c88d1e57e40f
|
|
| BLAKE2b-256 |
7492f3ab0d60007e2b10dcdbb60f3417ebd64017ca081424732f6745b11b376e
|