Skip to main content

ETL pipeline for US Treasury CDFI Fund public datasets — TLR, CLR, 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

Dataset Source Description
TLR (Transaction Level Report) CDFI Fund 1M+ individual CDFI loans, 61 variables
CLR (Consumer Loan Report) CDFI Fund 3.2M consumer loans aggregated to census tract
Awards Database CDFI Fund All CDFI Fund program awardees across all years

Data Sources

CDFI Fund datasets (TLR, CLR, Awards) come from the US Department of Treasury CDFI Fund: https://www.cdfifund.gov/research-data

All data is released 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.2.0.tar.gz (15.9 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.2.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cdfidata-0.2.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for cdfidata-0.2.0.tar.gz
Algorithm Hash digest
SHA256 73e4f3556d45e7071c8349744e5eeb3c39c300270d8f68f576c40d69f74350f5
MD5 1812176a516f4e2a1ce50e12ce304efa
BLAKE2b-256 a3c6a43726ead05828a5d13ade253ab76b0a9777b3816021e848dc6eed7fc3cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for cdfidata-0.2.0.tar.gz:

Publisher: release.yml on Jaypatel1511/cdfi-data

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: cdfidata-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for cdfidata-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14eee4d3b4c30b71914aad18216912f16b6899b59dc3cbe11485c8f098017697
MD5 91f4683202e0763a4d29bcb49b6d4394
BLAKE2b-256 d6e1e2339eda0a1059063348dd77bac0f34a95f83eebbe9e344413c33406545c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cdfidata-0.2.0-py3-none-any.whl:

Publisher: release.yml on Jaypatel1511/cdfi-data

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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