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.

This package is currently in active development. Features and APIs may change. Please submit questions, feedback or requests via the issues page.

Getting started

Most users can get the data they need by using the ODAData 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 ODAData

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

# load the desired indicators
data.load_indicator(indicator="total_oda_flow_net")
data.load_indicator(indicator="total_oda_ge")

# get the data
df = data.get_data(indicators='all')

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 view the full list of available indicators, you can call .get_available_indicators().

from oda_data import ODAData

# create object
data = ODAData()

# get the list of available indicators
data.available_indicators()

This logs the list of indicators to the console. For example, the first several:

Available indicators:
total_oda_flow_net
total_oda_ge
total_oda_bilateral_flow_net
total_oda_bilateral_ge
total_oda_multilateral_flow_net
total_oda_multilateral_ge
total_oda_flow_gross
total_oda_flow_commitments
total_oda_grants_flow
total_oda_grants_ge
total_oda_non_grants_flow
total_oda_non_grants_ge
gni
oda_gni_flow
od_gni_ge
.
.
.

Project details


Release history Release notifications | RSS feed

This version

0.1.9

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-0.1.9.tar.gz (80.4 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-0.1.9-py3-none-any.whl (89.1 kB view details)

Uploaded Python 3

File details

Details for the file oda_data-0.1.9.tar.gz.

File metadata

  • Download URL: oda_data-0.1.9.tar.gz
  • Upload date:
  • Size: 80.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for oda_data-0.1.9.tar.gz
Algorithm Hash digest
SHA256 af481bc37afd3b2f1f784475667530c0dc15f5d2c5f4b1c934a64c55e5461bb1
MD5 666d69b64b4485457168480f5b0564d0
BLAKE2b-256 ac01f104025c6f7597e277e7093ad6fa4f1cf46ee3f295e33c1095d5ebda5083

See more details on using hashes here.

File details

Details for the file oda_data-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: oda_data-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 89.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for oda_data-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 71bde4cbc717f40e50e6f08cb8c8ad64146da18e51918e31e6f109726fbc44ad
MD5 e28175d4e46aae61b748c6235e7de67f
BLAKE2b-256 3966e52209db5cd7b356ea2e6c2c5ff44ea345c5f4572c1023a78f2a19e007f2

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