The validator is currently limited to giving feedback on things that operate within the realm of the standard, and rules that can be written about IATI elements e.g. you use this element in this way if you also have this element.
Validator with brains is about giving higher level data quality feedback - and to do so, it needs to pull in external data and to be able to 'think'. For example: 'Is this activity published in one of the national languages of the recipient'? To do this requires determining the language used for the activity, and comparing it to a list of national languages linked from the recipient-country data.
As many aspects of this process are shared (looping through IATI data, presenting feedback), they should be built once.
Proposal
A validator that loops through IATI data, provides different data entry points, and handles the error reporting etc, but that supports scripts which follow a standardised format, e.g. activity input, code to run, defined 'answer' returned.
In the example above, the script would state that it need elements X and Y from each activity and the validator would loop through the IATI data, and for each activity identified, trigger the script, passing the elements requested, before waiting for a returned answer, then compiling the returns and presenting them to the user.
For the example above:
<data-required>/activities/activity/description, /activities/activity/recipient-country
<return type>binary
<return options>valid/not valid
<return-aggregation>allowed
<script-language>python
<script-requirements>langdetect
<script>
from langdetect import detect
for each recipient-country = X
scrape https://en.wikipedia.org/wiki/List_of_official_languages_by_country_and_territory for X, return national language
if detect("description") = X
then return valid, else return invalid.......
</script>
Other things I would like to try:
Is the activity value reasonable - calculates whether there are thousands of activities each worth under $10k.....or whether there are very few huge activities. Compares it to activities of other publishers and/or some set idea of a reasonable project size
Is the project name something sensible, or is it just 15070/BGE/SOM/20 - calculates punctuation and numbers as a percentage of the activity name characters
How soon was the disbursement published - i.e. is the data realtime (enough)
Does the activity files include a statement about whether the data is the official data of the publisher.....
Rationale
The validator is currently limited to giving feedback on things that operate within the realm of the standard, and rules that can be written about IATI elements e.g. you use this element in this way if you also have this element.
Validator with brains is about giving higher level data quality feedback - and to do so, it needs to pull in external data and to be able to 'think'. For example: 'Is this activity published in one of the national languages of the recipient'? To do this requires determining the language used for the activity, and comparing it to a list of national languages linked from the recipient-country data.
As many aspects of this process are shared (looping through IATI data, presenting feedback), they should be built once.
Proposal
A validator that loops through IATI data, provides different data entry points, and handles the error reporting etc, but that supports scripts which follow a standardised format, e.g. activity input, code to run, defined 'answer' returned.
In the example above, the script would state that it need elements X and Y from each activity and the validator would loop through the IATI data, and for each activity identified, trigger the script, passing the elements requested, before waiting for a returned answer, then compiling the returns and presenting them to the user.
For the example above:
Other things I would like to try: