Skip to content
This repository was archived by the owner on Jul 17, 2020. It is now read-only.

Discovering partner files that link to DFID projects

johnadamsDFID edited this page Feb 9, 2015 · 7 revisions

To discover partner files that link to DFID projects, so that we can load the data and make traceability happen!

Steps to take

Step 1: Download data in XML from the IATI Datastore using the API:

International NGOs ('reporting-org/type="21"'):

 http://datastore.iatistandard.org/api/1/access/activity.xml?transaction_provider-org=GB-1&reporting-org.type=21&limit=500

Small NGOs ('reporting-org/type="22"'):

 http://datastore.iatistandard.org/api/1/access/activity.xml?transaction_provider-org=GB-1&reporting-org.type=22&limit=500

Private Sector ('reporting-org/type="70"'):

 http://datastore.iatistandard.org/api/1/access/activity.xml?transaction_provider-org=GB-1&reporting-org.type=70&limit=500

Step 2: Load these files into BaseX on your local machine

Step 3: Run an XQuery to extract the list of organisations

 let $orgs:= distinct-values(//reporting-org)
 return
 <reporting-orgs>
 {
   for $org in $orgs 
   order by $org  
   return <org>{$org}</org>
 }
 </reporting-orgs>

Results from 13 August 2014 are in a Partner Files Gist.

You can also extract the funding projects from an XQuery:

let $projs:= distinct-values(//transaction[transaction-type/@code="IF"]/provider-org/@provider-activity-id)
return
<funding-projects>
{
  for $proj in $projs 
  order by $proj  
  return <project>{$proj}</project>
}
</funding-projects>

And the results are on a Funding Projects Gist

Step 4: Test load on a Dev box, review the results

Clone this wiki locally