DAC and CRS code lists

core

Files Size Format Created Updated License Source
17 512kB csv zip 1 week ago 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 DAC members 724B csv (724B) , json (2kB)
multilateral-donors Multilateral donors 1kB csv (1kB) , json (3kB)
non-dac-donors Non-DAC donors 602B csv (602B) , json (1kB)
private-donors Private donors 92B csv (92B) , json (110B)
agencies Agencies 32kB csv (32kB) , json (79kB)
nature-of-submission Nature of submission 481B csv (481B) , json (715B)
recipients Recipients 9kB csv (9kB) , json (21kB)
channel-codes Channel codes 42kB csv (42kB) , json (75kB)
collaboration-types Collaboration types 2kB csv (2kB) , json (2kB)
flow-types Flow types 2kB csv (2kB) , json (2kB)
finance-types Finance types 10kB csv (10kB) , json (16kB)
finance-type-categories Finance type categories 454B csv (454B) , json (709B)
aid-types Aid types 15kB csv (15kB) , json (18kB)
aid-type-categories Aid type categories 3kB csv (3kB) , json (4kB)
sectors Sectors 114kB csv (114kB) , json (151kB)
sector-categories Sector categories 22kB csv (22kB) , json (27kB)
dac-and-crs-code-lists_zip Compressed versions of dataset. Includes normalized CSV and JSON data with original data and datapackage.json. 266kB zip (266kB)

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  

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  

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  

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  

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  

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  

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  

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  

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  

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  

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  

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  

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  

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  

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  

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

dac-and-crs-code-lists_zip  

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

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.

Import into your tool

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

In order to work with Data Packages in Pandas you need to install the Frictionless Data data package library and the pandas extension:

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')

# get list of all resources:
resources = package.descriptor['resources']
resourceList = [resources[x]['name'] for x in range(0, len(resources))]
print(resourceList)

# print all tabular data(if exists any)
resources = package.resources
for resource in resources:
    if resource.tabular:
        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)
    }
  }
})()
Datapackage.json