Skip to Content

Open-source packages

Open-source Python packages from the DFO team for development finance data, from readers for OECD and IMF data to price conversion and entity matching.

The DFO team maintains open-source Python packages for development finance data. Use them to work directly with the source data, convert prices, match names to entities, or repeat a step the DFO runs. To get DFO data in code, use the SDK.

PackageWhat it doesHow the DFO uses it
oda-readerDownloads seven development-finance tables, six from the OECD (including DAC1, DAC2a, DAC2b, and the CRS) and one from AidData.Imports DAC1, DAC2a, DAC2b, and the CRS.
imf-readerReads the IMF's World Economic Outlook and Special Drawing Rights rates into pandas.Imports the World Economic Outlook.
dcp-toolsBuilds files for a Data Commons Platform instance, uploads them, and starts ingestion.Loads the DFO's data and ontology into its knowledge graph.
oda-dataBuilds ODA indicators from OECD DAC data, including multilateral spending imputed to providers and sectors.Builds ONE's imputed multilateral sectors data.
ResolveKitMatches place and organisation names and codes to canonical entities.Resolves places and organisations named in a search question, or sent to the graph's resolve operation, to graph ids.
pydeflateConverts numbers between current and constant prices, and between currencies.None. The DFO converts prices with the ONE Conversion Tables.
tossd-readerLoads TOSSD (Total Official Support for Sustainable Development) activity records into pandas.None. The DFO does not serve TOSSD data.

Every package needs Python 3.12 or later (dcp-tools needs 3.13 or later). All but tossd-reader install from PyPI under the names above. tossd-reader installs from GitHub.

Terminal
uv add git+https://github.com/ONEcampaign/tossd-reader.git        # in a uv project
pip install git+https://github.com/ONEcampaign/tossd-reader.git   # with pip