oda-data
oda-data gives you official development assistance (ODA) figures from the OECD's DAC tables by name, for any years and providers, in any currency, with a record of where each number came from.
provider_name year basis value
0 France 2024 grant_equivalent 15448.26
1 Germany 2024 grant_equivalent 32836.11
2 United Kingdom 2024 grant_equivalent 17991.79
3 United States 2024 grant_equivalent 65475.37
import oda_data as oda
df = oda.get("oecd.dac1.total_oda", years=2024, providers=["USA", "DEU", "GBR", "FRA"])
print(df[["provider_name", "year", "basis", "value"]])
Values are USD millions. The first call downloads the OECD's DAC1 table (about 10 MB) and keeps it on disk.
Install
pip install oda-data
oda-data needs Python 3.12 or later. pip install "oda-data[polars]" adds Query.to_polars().
What it does
Most ODA figures depend on reading a DAC table correctly: DAC1 for official totals, DAC2A for what recipients receive, the CRS for sectors and channels. Each table has its own codes, bases, aggregate rows, and lines that nest inside each other. oda-data holds those rules in more than 40 named indicators, such as oecd.dac1.total_oda, oecd.crs.bilateral_oda, and one.crs.imputed_multilateral_oda, so one call returns one tidy table.
import oda_data as oda
dac = oda.groups.dac_countries
# Each DAC country and the DAC total, in constant 2024 euros
oda.get(
"oecd.dac1.total_oda",
years=range(2015, 2025),
providers=[dac, oda.total(dac)],
unit=oda.constant("EUR", 2024),
)
# Bilateral ODA to Kenya by broad sector
oda.get("oecd.crs.bilateral_oda", years=2023, recipients="KEN", by=["broad_sector"])
Every result has the same columns, converts money provider by provider before any sum, and refuses a question its table cannot answer with an error that names the indicator that can. oda-reader downloads and caches the OECD tables, and pydeflate supplies deflators and exchange rates from the same DAC1 release.
oda-data is the wrong tool for a pipeline that needs the raw OECD tables. Read those with oda-reader.
Documentation
- Tutorial: chart ten years of G7 aid
- How-to guides: finding the indicator for a question, units, groups, sectors, imputed multilateral sectors, records, provenance, offline use
- Indicators and the public API
- Counting rules: which rows count, and why
- Migrating from 2.x: the 3.0 call for any 2.x code, and the numbers that change
3.0 replaces the 2.x API. oda.search("DAC1.10.1010") returns the 3.0 call for any 2.x indicator code.
Questions and bug reports go to the issue tracker. CONTRIBUTING.md explains how to work on the package.
MIT licence. See LICENSE.
Metadata
Release files for oda_data 3.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| oda_data-3.0.1.tar.gz | 242.7 kB | Without provenance | Details for oda_data-3.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| oda_data-3.0.1-py3-none-any.whl | Python 3 | none | any | Details for oda_data-3.0.1-py3-none-any.whl |
Total release size: 502.6 kB
Release files / oda_data-3.0.1.tar.gz
| Download URL | oda_data-3.0.1.tar.gz |
|---|---|
| Size | 242.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e126d4cccac4c1a560739c06037ed9a5717a3f1a509ee9abc8ce762cdeaa41bb
|
|
BLAKE2b-256 checksum How to use checksums |
89dc90ab66593d1352d084029b98a74e597644ca6f20fe1dc2bcdaa2b5193c94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / oda_data-3.0.1-py3-none-any.whl
| Download URL | oda_data-3.0.1-py3-none-any.whl |
|---|---|
| Size | 260.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
704858ec585d655e112efd67665f3f8bff4a312a173a0a7e98cc951a1ecd1d04
|
|
BLAKE2b-256 checksum How to use checksums |
c6f0b1a73d63899aa3713c9ce0391711e5a933188eaa3422b8ab8ac37119e0dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for oda_data 3.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.