Git Product home page Git Product logo

iati-codelists's Introduction

IATI Codelists

https://travis-ci.org/IATI/IATI-Codelists.svg?branch=version-2.01 Requirements Status

Introduction

This repository contains the codelists for the IATI Standard, and is part of the Single Source of Truth (SSOT). For more information about the SSOT, please see http://iatistandard.org/202/developer/ssot/

The Codelists

The source codelists can be found in the xml/ directory.

Embedded vs NonEmbedded Codelists

This repository contains only codelists that are embedded in the IATI Standard. Embedded means that IATI is directly responsible for them, and any changes to them need to go through the same change control process as other changes to the standard.

Those codelists that are not embedded can be found in a seperate repository at https://github.com/IATI/IATI-Codelists-NonEmbedded/. These lists are typically maintained by other organisations that IATI has no control over but which IATI data relies on such as country codes, language codes and so on. The aspiration for these codelists is to have them pulled from their external sources regularly and automatically.

Codelist XML Format

The codelist are in an XML format described by the codelist.xsd schema. This format has been chosen for the single source of truth as it has a number of advantages over the previous format used by IATI.

  • the codelists no longer include the element name as a tag name,
  • all have language information described the same way as IATI XML
  • as there is a codelist schema we can validate all the source XML
  • more metadata, including a description, is now included in the codesists

Codelists in Other Formats (.json, .csv)

gen.sh (which calls gen.py) can be used to convert the Codelists to JSON and CSV format. Converted coedlists are availible on dev.iatistandard.org

To do the conversion yourself, you will need BASH, Python and python-lxml. Then simply run gen.sh. The generated codelists will be in the out folder.

Codelist Mapping

mapping.xml relates codelists to an XML path in the standard. This should make it easier for users to work out which codelists go with which element and vice versa.

It's structured as a list of mapping elements, which each have a path element that describes the relevant attribute, and a codelist@ref attribute which is the same ref as used in the codelist filenames. An optional condition element is an xpath expression which limits the scope of the given codelist - e.g. it only applies if a certain vocabulary is being used. A sample of the XML is as follows:

<mappings>
    <mapping>
        <path>//iati-activity/@default-currency</path>
        <codelist ref="Currency" />
    </mapping>
    <mapping>
        <path>//iati-activity/country-budget-items/budget-item/@code</path>
        <codelist ref="BudgetIdentifier" />
        <condition>@vocabulary = '1'</condition>
    </mapping>
    ...
</mappings>

A JSON version is also availible.

Testing Compliance Against Codelists

testcodelists.py is can be run against an IATI Activity XML to check that it is using the correct codelists values. Only codelists that are complete will be tested (see next section).

Extra Metadata

complete - boolean that describes whether the codelist is 'complete' ie. having a value not on the codelist is definitely invalid. An example of an incomplete codelist is country codes, where extra codes may exist for disputed countries.

iati-codelists's People

Contributors

bjwebb avatar caprenter avatar dalepotter avatar hayfield avatar requires avatar rolfkleef avatar rorads avatar stevieflow avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.