DAC and CRS code lists

core

Files Size Format Created Updated License Source
17 573kB csv zip 7 months ago 4 weeks ago Open Data Commons Public Domain Dedication and License v1.0 OECD
The DAC Secretariat maintains various code lists which are used by donors to report on their aid flows to the DAC databases. In addition, these codes are used to classify information in the DAC databases. Here you can find these codes republished in a machine readable format. They’re fetched read more
Download

Data Files

File Description Size Last changed Download
dac-members List of donor codes and names for DAC members. Currency codes for a donor’s currency refer to the donor code in question (e.g. Australian dollars use donor code 801 for Australia. Note: the currency code for the Euro uses the donor code for EU Institutions, i.e. 918). 724B csv (724B) , json (2kB)
multilateral-donors List of donor codes and names for multilateral donors. 1kB csv (1kB) , json (3kB)
non-dac-donors List of donor codes and names for non-DAC donors. 602B csv (602B) , json (1kB)
private-donors List of donor codes and names for private donors. 92B csv (92B) , json (110B)
agencies List of agency codes and names including agency acronyms. 32kB csv (32kB) , json (79kB)
nature-of-submission List of codes used to determine whether a transaction refers to a newly reported activity or previously reported activity. 481B csv (481B) , json (715B)
recipients Recipient codes and names, grouped by income group and geographical distribution. 9kB csv (9kB) , json (21kB)
channel-codes List of major channels of delivery codes and names. 42kB csv (42kB) , json (75kB)
collaboration-types List of codes used to determine the character of resource flows (bilateral or multilateral). 2kB csv (2kB) , json (2kB)
flow-types List of codes used to distinguish official development assistance, other official flows and private flows. 2kB csv (2kB) , json (2kB)
finance-types List of codes used to distinguish financial instruments, e.g. grants or loans. 10kB csv (10kB) , json (16kB)
finance-type-categories Finance type categories 454B csv (454B) , json (709B)
aid-types List of codes used to distinguish aid modalities. 15kB csv (15kB) , json (18kB)
aid-type-categories Aid type categories 3kB csv (3kB) , json (4kB)
sectors List of 5 digit codes, names and descriptions used to identify the sector of destination of a contribution. 115kB csv (115kB) , json (152kB)
sector-categories Sector categories 21kB csv (21kB) , json (26kB)
dac-and-crs-code-lists_zip Compressed versions of dataset. Includes normalized CSV and JSON data with original data and datapackage.json. 258kB zip (258kB)

DAC members [dac-members]  

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
code 1 string
name_en 2 string
name_fr 3 string

Multilateral donors [multilateral-donors]  

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
code 1 string
name_en 2 string
name_fr 3 string

Non-DAC donors [non-dac-donors]  

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
code 1 string
name_en 2 string
name_fr 3 string

Private donors [private-donors]  

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
code 1 string
name_en 2 string
name_fr 3 string

Agencies [agencies]  

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
code 1 string
donor_name_en 2 string
donor_name_fr 3 string
agency_code 4 string
agency_name_en 5 string
agency_name_fr 6 string
acronym 7 string

Nature of submission [nature-of-submission]  

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
code 1 string
name_en 2 string
name_fr 3 string

Recipients [recipients]  

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
code 1 string
name_en 2 string
name_fr 3 string
income_group 4 string
geography 5 string

Channel codes [channel-codes]  

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
category 1 string
code 2 string
name_en 3 string
acronym_en 4 string
name_fr 5 string
acronym_fr 6 string

Collaboration types [collaboration-types]  

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
code 1 string
name_en 2 string
name_fr 3 string

Flow types [flow-types]  

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
code 1 string
name_en 2 string
description_en 3 string
name_fr 4 string
description_fr 5 string

Finance types [finance-types]  

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
category 1 string
code 2 string
name_en 3 string
description_en 4 string
name_fr 5 string
description_fr 6 string

Finance type categories [finance-type-categories]  

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
code 1 string
name_en 2 string
name_fr 3 string

Aid types [aid-types]  

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
category 1 string
code 2 string
name_en 3 string
description_en 4 string
name_fr 5 string
description_fr 6 string

Aid type categories [aid-type-categories]  

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
code 1 string
name_en 2 string
description_en 3 string
name_fr 4 string
description_fr 5 string

Sectors [sectors]  

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
category 1 string
code 2 string
voluntary_code 3 string
name_en 4 string
description_en 5 string
name_fr 6 string
description_fr 7 string

Sector categories [sector-categories]  

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
code 1 string
name_en 2 string
description_en 3 string
name_fr 4 string
description_fr 5 string

Import into your tool

Data-cli or just data is the program to get and post your data with the datahub.
Download CLI tool and use it with the datahub almost like you use git with the github:

data get https://datahub.io/core/dac-and-crs-code-lists
data info core/dac-and-crs-code-lists
tree core/dac-and-crs-code-lists
# Get a list of dataset's resources
curl -L -s https://datahub.io/core/dac-and-crs-code-lists/datapackage.json | grep path

# Get resources

curl -L https://datahub.io/core/dac-and-crs-code-lists/r/0.csv

curl -L https://datahub.io/core/dac-and-crs-code-lists/r/1.csv

curl -L https://datahub.io/core/dac-and-crs-code-lists/r/2.csv

curl -L https://datahub.io/core/dac-and-crs-code-lists/r/3.csv

curl -L https://datahub.io/core/dac-and-crs-code-lists/r/4.csv

curl -L https://datahub.io/core/dac-and-crs-code-lists/r/5.csv

curl -L https://datahub.io/core/dac-and-crs-code-lists/r/6.csv

curl -L https://datahub.io/core/dac-and-crs-code-lists/r/7.csv

curl -L https://datahub.io/core/dac-and-crs-code-lists/r/8.csv

curl -L https://datahub.io/core/dac-and-crs-code-lists/r/9.csv

curl -L https://datahub.io/core/dac-and-crs-code-lists/r/10.csv

curl -L https://datahub.io/core/dac-and-crs-code-lists/r/11.csv

curl -L https://datahub.io/core/dac-and-crs-code-lists/r/12.csv

curl -L https://datahub.io/core/dac-and-crs-code-lists/r/13.csv

curl -L https://datahub.io/core/dac-and-crs-code-lists/r/14.csv

curl -L https://datahub.io/core/dac-and-crs-code-lists/r/15.csv

curl -L https://datahub.io/core/dac-and-crs-code-lists/r/16.zip

If you are using R here's how to get the data you want quickly loaded:

install.packages("jsonlite", repos="https://cran.rstudio.com/")
library("jsonlite")

json_file <- 'https://datahub.io/core/dac-and-crs-code-lists/datapackage.json'
json_data <- fromJSON(paste(readLines(json_file), collapse=""))

# get list of all resources:
print(json_data$resources$name)

# print all tabular data(if exists any)
for(i in 1:length(json_data$resources$datahub$type)){
  if(json_data$resources$datahub$type[i]=='derived/csv'){
    path_to_file = json_data$resources$path[i]
    data <- read.csv(url(path_to_file))
    print(data)
  }
}

Note: You might need to run the script with root permissions if you are running on Linux machine

Install the Frictionless Data data package library and the pandas itself:

pip install datapackage
pip install pandas

Now you can use the datapackage in the Pandas:

import datapackage
import pandas as pd

data_url = 'https://datahub.io/core/dac-and-crs-code-lists/datapackage.json'

# to load Data Package into storage
package = datapackage.Package(data_url)

# to load only tabular data
resources = package.resources
for resource in resources:
    if resource.tabular:
        data = pd.read_csv(resource.descriptor['path'])
        print (data)

For Python, first install the `datapackage` library (all the datasets on DataHub are Data Packages):

pip install datapackage

To get Data Package into your Python environment, run following code:

from datapackage import Package

package = Package('https://datahub.io/core/dac-and-crs-code-lists/datapackage.json')

# print list of all resources:
print(package.resource_names)

# print processed tabular data (if exists any)
for resource in package.resources:
    if resource.descriptor['datahub']['type'] == 'derived/csv':
        print(resource.read())

If you are using JavaScript, please, follow instructions below:

Install data.js module using npm:

  $ npm install data.js

Once the package is installed, use the following code snippet:

const {Dataset} = require('data.js')

const path = 'https://datahub.io/core/dac-and-crs-code-lists/datapackage.json'

// We're using self-invoking function here as we want to use async-await syntax:
;(async () => {
  const dataset = await Dataset.load(path)
  // get list of all resources:
  for (const id in dataset.resources) {
    console.log(dataset.resources[id]._descriptor.name)
  }
  // get all tabular data(if exists any)
  for (const id in dataset.resources) {
    if (dataset.resources[id]._descriptor.format === "csv") {
      const file = dataset.resources[id]
      // Get a raw stream
      const stream = await file.stream()
      // entire file as a buffer (be careful with large files!)
      const buffer = await file.buffer
      // print data
      stream.pipe(process.stdout)
    }
  }
})()

Read me

goodtables.io

The DAC Secretariat maintains various code lists which are used by donors to report on their aid flows to the DAC databases. In addition, these codes are used to classify information in the DAC databases.

Here you can find these codes republished in a machine readable format. They’re fetched from an excel file available on the OECD website.

Preparation

You will need: python 3.x

Run the following to download and convert the data from XLS to CSV:

pip install -r requirements.txt
python scraper.py

License

This material is licensed by its maintainers under the Public Domain Dedication and License.

Datapackage.json