IATI Switcheroo

Hello,

Hope all is well where you are. We made this over last weekend and thought we’d share it with you.

https://notshi.github.io/IATIswitcheroo/

It’s a website that exposes some of d-portal’s internal data conversions; you could use it to convert an xml file to csv, make changes to that csv and upload it again to convert back to xml so this could be useful for small publishers.

Optionally, you can use this to convert to html and have a quick preview of the data in print-friendly SAVi.

Feedback and comments are much appreciated.

3 Likes

Oooh, very cool - the most readable csv format I have seen so far :slight_smile: and super easy to just do a pivot table on to get real data out.

Would it be hard (and make sense?) to make it spit out xlsx files, with one tab for the activity level stuff, and another for the transactions? Maybe with a column that listed the activity-ID for each row on the transaction tab?

3 Likes

Nice, but the XML export seems to fail schema validation?! :grimacing:

Has this app been tested with validator reports @ https://test-validator.iatistandard.org ? I got (input raw XML valid data) that became schema-invalid once it got Switcherood from XML to XML…

Thanks, Matt!

We made this so it’s a flat format and not made of multiple files so that it can go back and forth between formats.

I think you can probably do this sort of processing using scripts inside a spreadsheet once you have the csv but we haven’t explored this yet!

Huh, interesting. Thanks, Siem!

Just ran an example via the validator and it looks like the export failed due to the wrong order of elements. Is this what you meant?

We didn’t think the order of data mattered so didn’t put that into account. Currently it’s ordered alphabetically so it’s easy to find things (human legible).

Suppose it’s called Switcheroo for a reason :} Will go change that then.

XML export for IATI Switcheroo should now pass schema validation. Do let us know otherwise!

5 Likes

Hi @shi. I downloaded XML files using the Data Dump third party tool (which I can’t find anymore now). I am trying to use Switcheroo with those XML files but nothing is happening after adding (by browsing) or dragging XML files to the tool.

It’s here:

1 Like

Hi @Jet, thanks for letting me know.

Currently, you can only upload one file at a time so multiple files are not supported.

If the file is large (~20mb), it might take some time for the download buttons to show up - on the up side, if the file is small (~50kb), the download buttons show up almost instantly that you can miss it.

Thanks for your explanation! I misunderstood how it worked and it was working just fine. I was expecting it to display the contents of the XML on the webpage.

I am wondering now though how you are able to use the downloaded CSV. I am using a Worldbank XML as an example. It doesn’t seem different from if I opened the XML using Excel directly.

For example, how could I show total yearly transactions per activity?

The downloaded CSV is a special mirror version of the IATI XML which is designed so that you can edit it and it will convert back to schema validated IATI XML.

Ultimately, this is a tool for publishers rather than consumers of the data.

To use the data, as per your example; show total yearly transactions per activity - you’ll need to refer to IATI specific rules and conditions to get that data out as the data is not processed and comes as published.

The rules for getting the information out of the data are too complicated to be done by hand and requires programming.

It might be worthwhile to talk to the @IATI-techteam for this particular query. Hope this helps!

1 Like