Skip to main content

A python package to work with Official Development Assistance data from the OECD DAC.

Project description

pypi python codecov Code style: black

The ODA Data Package

This package contains key tools used by The ONE Campaign to analyse Official Development Assistance (ODA) data from the OECD DAC databases.

Interacting with the DAC databases can be a complex task. There are many databases, tables, and web interfaces which can be used to get the data you need. This means that getting the right ODA data can require expert knowledge not only of ODA, but also of how the DAC databases and tools are organised.

This package aims to simplify this process and make it easier for users to get the data they need.

Please submit questions, feedback or requests via the issues page.

Getting started

Installation

The package can be installed using pip:

pip install oda-data --upgrade

The package is compatible with Python 3.10 and above.

Basic usage

Most users can get the data they need by using the Indicators class.

An object of this class can handle:

  • getting data for specific indicators (one or more)
  • filtering the data for specific donors, recipients(if relevant), years.
  • returning the data in a variety of currency/prices combinations.

For example, to get Total ODA in net flows and grant equivalents, in constant 2021 Euros, for 2018-2021.

from oda_data import Indicators, set_data_path

# set the path to the folder where the data should be stored
set_data_path("path/to/data/folder")

# create object, specifying key details of the desired output
data = Indicators(years=range(2018, 2022), currency="EUR", prices="constant", base_year=2021)

# load the desired indicators
data.load_indicator(indicators=["total_oda_flow_net", "total_oda_ge"])

# get the data
df = data.get_data()

print(df.head(6))

This would result in the following dataframe:

donor_code donor_name year value indicator currency prices
1 Austria 2021 1261.76 total_oda_flow_net EUR constant
1 Austria 2021 1240.31 total_oda_ge EUR constant
2 Belgium 2021 2176.38 total_oda_flow_net EUR constant
2 Belgium 2021 2174.38 total_oda_ge EUR constant
3 Denmark 2021 2424.51 total_oda_flow_net EUR constant
3 Denmark 2021 2430.65 total_oda_ge EUR constant

To print the full list of available indicators, you can call .get_available_indicators().

For full details on the available indicators and how we calculate them, see the indicators [documentation](oda_data/settings/Available indicators.md)

Tutorials

For more detailed examples of how to use the package, see the tutorials.

  • A tutorial notebook on loading the package and getting total oda data
  • A tutorial notebook on getting ODA by donor and recipient (including both bilateral and imputed multilateral data)
  • A tutorial notebook on getting ODA by sectors (including both bilateral and imputed multilateral data)

Please reach out if you have questions or need help with using the package for your analysis.

Key features

  • Speed up analysis - The package handles downloading, cleaning and loading all the data, so you can focus on the analysis. The data is downloaded from the bulk download service of the OECD, and once it is stored locally, producing the output is extremely fast.
  • Access all of our analysis - Besides the classic OECD DAC indicators, the package also provides access to the data and analysis produced by ONE. This includes gender or climate data in gross disbursement terms (instead of commitments) and our multilateral sectors imputations.
  • Get data in the currency and prices you need - ODA data is only available in US dollars (current or constant prices) and local currency units (current prices). The package allows you to view the data in US dollars, Euros, British Pounds and Canadian dollars, in both current and constant prices. We can add any other DAC currency if you request it via the issues page

Contributing

Interested in contributing to the package? Please reach out.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oda_data-2.0.0b1.tar.gz (142.6 kB view details)

Uploaded Source

Built Distribution

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

oda_data-2.0.0b1-py3-none-any.whl (162.1 kB view details)

Uploaded Python 3

File details

Details for the file oda_data-2.0.0b1.tar.gz.

File metadata

  • Download URL: oda_data-2.0.0b1.tar.gz
  • Upload date:
  • Size: 142.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.6 Darwin/24.3.0

File hashes

Hashes for oda_data-2.0.0b1.tar.gz
Algorithm Hash digest
SHA256 f5c2e3c65ce20c98a20267a7174b2e542abe0a60de9fc3100b64b6afa721ecd8
MD5 ff5dd0b4c5113a1c576dae99a71389a4
BLAKE2b-256 630a1b020da626a16f654003908862f44d9d0da284fc4ad00d953fe6c2387586

See more details on using hashes here.

File details

Details for the file oda_data-2.0.0b1-py3-none-any.whl.

File metadata

  • Download URL: oda_data-2.0.0b1-py3-none-any.whl
  • Upload date:
  • Size: 162.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.6 Darwin/24.3.0

File hashes

Hashes for oda_data-2.0.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 dce52373bfc27a9680e75ffa252b96ec0c31e2631e694a3a6392c484e25efcf6
MD5 1f18a990524493aff90f8380e2feaa56
BLAKE2b-256 804b3cfde0e80d6c30a6104d0156b458928bb6a78fb8a7392d62c87e08b24ae8

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