Skip to content

Instantly share code, notes, and snippets.

@andylolz
andylolz / mapping-validator-updates.xsd
Created September 18, 2021 11:12
An XSD for validating the updated mapping.xml file (i.e. including validation-rules)
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<xsd:element name="mappings">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="mapping" minOccurs="1" maxOccurs="unbounded" />
</xsd:sequence>
@andylolz
andylolz / mapping.xsd
Created September 16, 2021 07:38
A minimal XSD for validating the mapping.xml file in http://github.com/IATI/IATI-Codelists
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<xsd:element name="mappings">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="mapping" minOccurs="1" maxOccurs="unbounded" />
</xsd:sequence>
{
"@context": "http://schema.org",
"@type": "ClaimReview",
"identifier": "50c9b383-291d-495f-b75c-10516a819db0",
"datePublished": "2020-08-26",
"dateModified": "2020-08-26",
"description": "The paper, which was retracted days after it was published, did not prove any link between 5G and coronaviruses.",
"url": "https://fullfact.org/online/facebook-retracted-paper/",
"author": {
"@type": "Organization",
<!DOCTYPE html>
<html>
<head>
@andylolz
andylolz / active_v1_data.ipynb
Created May 15, 2019 11:21
Some stats on v1.0x data, using iatikit. Stats generated 15 May 2019.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andylolz
andylolz / .block
Last active November 8, 2023 14:21 — forked from mbostock/.block
IATI traceability
license: gpl-3.0
We can't make this file beautiful and searchable because it's too large.
timestamp,action,url,person,comment
"Nov. 28, 2014, 3:36 p.m.",person-update,,,Did a bit of googling.
"Dec. 7, 2014, 4:46 p.m.",candidacy-create,/person/3511,David Chappell,http://davidchappell.org.uk/en/
"Dec. 7, 2014, 4:50 p.m.",person-update,/person/3511,David Chappell,http://davidchappell.org.uk
"Jan. 15, 2015, 11:30 p.m.",person-update,/person/802,Anthony Ridge-Newman,http://ridgenewman.blogspot.co.uk
"Jan. 15, 2015, 11:49 p.m.",person-update,,,Standing in Shrewsbury and Atcham instead: https://shrewsburylibdems.wordpress.com/christine-tinker/
"Jan. 15, 2015, 11:56 p.m.",person-update,/person/2217,Andrew Illsley,http://alittlebitofstone.com/2015/01/15/ukip-selects-candidate-for-general-election/
"Jan. 16, 2015, 12:20 a.m.",person-update,,,https://shrewsburylibdems.wordpress.com/christine-tinker/
"Jan. 16, 2015, 12:26 a.m.",person-update,/person/1050,Christopher Warleigh-Lack,twitter.com
"Jan. 16, 2015, 12:37 a.m.",person-update,/person/2148,Emma Reynolds,http://news.bbc.co.uk/democracylive/hi/representat

Generating a nice diff of the changes in the v2.03 upgrade

First, fork this repo: https://github.com/IATI/IATI-Schemas

Then, do the following:

# clone version-2.02 branch to v2.03
git clone https://github.com/[your-username]/IATI-Schemas -b version-2.02 IATI-Schemas-v2.03
@andylolz
andylolz / results-2015-augmented.csv
Created April 20, 2017 22:37
GE2015 results, including Democracy Club ID (dc_id)
We can't make this file beautiful and searchable because it's too large.
dc_id,ons_id,ons_region_id,constituency_name,county_name,region_name,country_name,constituency_type,party_name,party_abbreviation,firstname,surname,gender,sitting_mp,former_mp,votes,share,change
4252,W07000049,W92000004,Aberavon,West Glamorgan,Wales,Wales,County,Labour,Lab,Stephen,Kinnock,Male,No,No,15416,0.489039749,-0.030147537
6754,W07000049,W92000004,Aberavon,West Glamorgan,Wales,Wales,County,UK Independence Party,UKIP,Peter,Bush,Male,No,No,4971,0.157694382,0.141898788
5518,W07000049,W92000004,Aberavon,West Glamorgan,Wales,Wales,County,Conservative,Con,Edward,Yi He,Male,No,No,3742,0.118706976,-0.023776389
5576,W07000049,W92000004,Aberavon,West Glamorgan,Wales,Wales,County,Plaid Cymru,PC,Duncan,Higgitt,Male,No,No,3663,0.116200869,0.045201451
4561,W07000049,W92000004,Aberavon,West Glamorgan,Wales,Wales,County,Liberal Democrat,LD,Helen,Clarke,Female,No,No,1397,0.044316848,-0.118290556
20,W07000049,W92000004,Aberavon,West Glamorgan,Wales,Wales,County,Independent,Ind,Captain,Beany,Male,No,No,1137,0.036068902,
[This page intentionally left blank]