Skip to content

Instantly share code, notes, and snippets.

@Bjwebb
Bjwebb / mapping.json
Last active January 21, 2016 14:07
2.02 CSV2IATI mapping template
{
"organisation": {
"reporting-org": {
"text": "",
"ref": "",
"type": ""
},
"default-currency": "",
"lang": "",
"contact-info": {
GB-1-201242 GB-COH-03788027-CSCF GB-COH-03788027-CSCF-542 GB-CHC-208724-CSCF542
GB-1-201242 GB-COH-03788027-CSCF GB-COH-03788027-CSCF-543 GB-CHC-208724-CSCF543
GB-1-201242 GB-COH-03788027-CSCF GB-COH-03788027-CSCF-540 GB-CHC-1079599-BN-2011-UG-DFID-36A
GB-1-201242 GB-COH-03788027-CSCF GB-COH-03788027-CSCF-541 GB-CHC-1079599-BN-2011-GH-DFID-541
GB-1-201242 GB-COH-03788027-CSCF GB-COH-03788027-CSCF-546 GB-CHC-281681-CSCF546
GB-1-201242 GB-COH-03788027-CSCF GB-COH-03788027-CSCF-544 GB-CHC-1001698-UGA001
GB-1-201242 GB-COH-03788027-CSCF GB-COH-03788027-CSCF-545 GB-CHC-1837621-545
GB-1-201242 GB-COH-03788027-CSCF GB-COH-03788027-CSCF-525 GB-CHC-250456-CSCF525
GB-1-201242 GB-COH-03788027-CSCF GB-COH-03788027-CSCF-526 GB-CHC-250456-CSCF526
GB-1-201242 GB-COH-03788027-CSCF GB-COH-03788027-CSCF-554 GB-COH-4075590-CSCF554
<b a1="GB-1-201242" a2="GB-COH-03788027-CSCF" a3="GB-COH-03788027-CSCF-542" a4="GB-CHC-208724-CSCF542"/>
<b a1="GB-1-201242" a2="GB-COH-03788027-CSCF" a3="GB-COH-03788027-CSCF-543" a4="GB-CHC-208724-CSCF543"/>
<b a1="GB-1-201242" a2="GB-COH-03788027-CSCF" a3="GB-COH-03788027-CSCF-540" a4="GB-CHC-1079599-BN-2011-UG-DFID-36A"/>
<b a1="GB-1-201242" a2="GB-COH-03788027-CSCF" a3="GB-COH-03788027-CSCF-541" a4="GB-CHC-1079599-BN-2011-GH-DFID-541"/>
<b a1="GB-1-201242" a2="GB-COH-03788027-CSCF" a3="GB-COH-03788027-CSCF-546" a4="GB-CHC-281681-CSCF546"/>
<b a1="GB-1-201242" a2="GB-COH-03788027-CSCF" a3="GB-COH-03788027-CSCF-544" a4="GB-CHC-1001698-UGA001"/>
<b a1="GB-1-201242" a2="GB-COH-03788027-CSCF" a3="GB-COH-03788027-CSCF-545" a4="GB-CHC-1837621-545"/>
<b a1="GB-1-201242" a2="GB-COH-03788027-CSCF" a3="GB-COH-03788027-CSCF-525" a4="GB-CHC-250456-CSCF525"/>
<b a1="GB-1-201242" a2="GB-COH-03788027-CSCF" a3="GB-COH-03788027-CSCF-526" a4="GB-CHC-250456-CSCF526"/>
<b a1="GB-1-201242" a2="GB-COH-03788027-CSCF" a3="GB-COH
1991 data/unitedstates/unitedstates-sd_pre_2011_election
1872 data/unitedstates/unitedstates-ne
1845 data/unitedstates/unitedstates-ng
1718 data/unitedstates/unitedstates-af
1630 data/unitedstates/unitedstates-sd
1376 data/unitedstates/unitedstates-pk
1337 data/unitedstates/unitedstates-ml
1329 data/asdb/asdb-activities
1062 data/unitedstates/unitedstates-et
967 data/unitedstates/unitedstates-ug
<?xml version="1.0" encoding="utf-8"?>
<iati-organisations version="1.02" generated-datetime="2013-06-07T16:24:34.347">
<iati-organisation last-updated-datetime="2012-06-07T16:24:34.347" default-currency="USD" xml:lang="en">
<reporting-org ref="41114" type="40">United Nations Development Programme</reporting-org>
<iati-identifier>41114</iati-identifier>
<name>United Nations Development Programme</name>
<!--Please note, the below forward looking budgets are indicative figures only, and do not fully reflect ongoing resource mobilization efforts.-->
<total-budget>
@Bjwebb
Bjwebb / -
Last active December 30, 2015 08:48
Activities missing from the datastore. Each line shows: difference in number of activities, package name, activities counted by me, activities in the datastore
73779 (total)
5073 sida-998 5566 493
2951 unitedstates-tz 3743 792
2808 unitedstates-usa_regional_crs_2010 3986 1178
2771 unitedstates-ml 3806 1035
2701 eu-998 5184 2483
2596 danida-all 2596 0
2520 minbuza_nl-activities 3921 1401
2230 fco-officialdevelopmentassistanceprogrammespend2012 2736 506
2150 unitedstates-gt 2285 135
@Bjwebb
Bjwebb / -
Last active December 29, 2015 08:59
for f in *; do echo -n $f; cat $f | jq '.result[] | .license_id' | sort | uniq -c; done | python ../../licenses.py | sed 's/ \+/,/' | sed 's/ \+/,/' | gist
aa,2,"OKD Compliant::Other (Attribution)"
aai,11,"OKD Compliant::Creative Commons Attribution"
aauk,1,"OKD Compliant::Creative Commons Attribution"
acaa,2,"OKD Compliant::Open Data Commons Public Domain Dedication and Licence (PDDL)"
acodevacord,1,"OKD Compliant::Open Data Commons Public Domain Dedication and Licence (PDDL)"
addinternational,2,"OKD Compliant::Other (Attribution)"
adrauk,1,"OKD Compliant::Open Data Commons Open Database License (ODbL)"
aet,1,"OKD Compliant::Creative Commons Attribution"
afdb,54,"OKD Compliant::Other (Attribution)"
afghanaid,1,"OKD Compliant::Other (Public Domain)"
@Bjwebb
Bjwebb / -
Created November 25, 2013 17:21
1 "OSI Approved::Attribution Assurance Licenses"
381 "OKD Compliant::Creative Commons Attribution"
13 "OKD Compliant::Creative Commons Attribution-sa"
5 "OKD Compliant::Creative Commons CCZero"
79 "Other::License Not Specified"
16 null
52 "OKD Compliant::Open Data Commons Open Database License (ODbL)"
82 "OKD Compliant::Open Data Commons Public Domain Dedication and Licence (PDDL)"
1563 "OKD Compliant::Other (Attribution)"
5 "Non-OKD Compliant::Other (Non-Commercial)"
@Bjwebb
Bjwebb / -
Created November 22, 2013 15:51
cat * | jq '.result[] | .license_id' | sort | uniq -c | gist
1 "attribution"
381 "cc-by"
13 "cc-by-sa"
5 "cc-zero"
79 "notspecified"
16 null
52 "odc-odbl"
82 "odc-pddl"
1563 "other-at"
5 "other-nc"
@Bjwebb
Bjwebb / -
Last active December 27, 2015 13:39
find . -type f -exec ls -l {} \; | awk '{ print $5" "$9 }' | grep -v .git | sort -n
114 ./sida/BG.xml
114 ./sida/BZ.xml
114 ./sida/CK.xml
114 ./sida/CU.xml
114 ./sida/CZ.xml
114 ./sida/GA.xml
114 ./sida/GY.xml
114 ./sida/HK.xml
114 ./sida/HU.xml
114 ./sida/IL.xml