Skip to main content

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

cdfidata-0.1.2.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

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

cdfidata-0.1.2-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file cdfidata-0.1.2.tar.gz.

File metadata

  • Download URL: cdfidata-0.1.2.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.12

File hashes

Hashes for cdfidata-0.1.2.tar.gz
Algorithm Hash digest
SHA256 45d3d6f2f6d6517505d03f139e2eecb1535733ea4e21af848bf876af48e585ab
MD5 f75fd8afa5b6e3a653918fc58d382855
BLAKE2b-256 a5ec31847f42f0a12bf563fae9300bace14479c8c14a3fdd5beca421c950e926

See more details on using hashes here.

File details

Details for the file cdfidata-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: cdfidata-0.1.2-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

Hashes for cdfidata-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e9c9b8bf4e6fc94f05c5d74184b28243572083bb4d3f600ac3fc1b21d1d2ce2d
MD5 9ac9d25d9ea49920789dd41f6d80c19f
BLAKE2b-256 0aa2fb34209fd2b35a649f42f395303d708a7a195ea0d65c67d0c364b896b6e1

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