codeforIATI / analytics

A dashboard of various metrics, generated nightly from IATI data
https://analytics.codeforiati.org
Other
0 stars 1 forks source link

[blank] values in attributes #45

Closed stevieflow closed 3 years ago

stevieflow commented 3 years ago

There are a number of instances where the attribute is published, but not populated. For example:

https://aidstream.s3.us-west-2.amazonaws.com/xml/acet-activities.xml has a blank linked-data-uri attribute:

<iati-activity last-updated-datetime="2019-06-18T10:43:52+00:00" xml:lang="en" default-currency="USD" humanitarian="false" hierarchy="1" linked-data-uri="">

Analytics falsely counts these in the codelist breakdown - suggesting a value is provided ("Publishing this element"):

https://analytics.codeforiati.org/element/iati-activity_@linked-data-uri.html

I'm not sure of the best solution - but this covers all attributes, regardless of whether they should be populated by a codelist, boolean or string etc.

andylolz commented 3 years ago

Good point.

I’m tempted to reclassify an empty string as “not publishing this element”… The difference between having the attribute and it’s empty, versus not having it seems pretty academic.

andylolz commented 3 years ago

I’ve had a go at a fix here: https://github.com/codeforIATI/IATI-Stats/pull/13

stevieflow commented 3 years ago

I’m tempted to reclassify an empty string as “not publishing this element”

Yes, seems sensible to me

andylolz commented 3 years ago

This should be fixed now.

stevieflow commented 3 years ago

Should we put some disclaimer text to say that [BLANK] values are classed as not publishing?

andylolz commented 3 years ago

Oh, v good point

andylolz commented 3 years ago

Okay, I’ve added that now. It will appear on the next build, and on https://analytics-dev.codeforiati.org/ when this finishes.

andylolz commented 3 years ago

Should we put some disclaimer text to say that [BLANK] values are classed as not publishing?

On the elements page, I’ve added:

Empty values for attributes are treated the same as if the attribute is not present.

…and on the individual element pages (e.g. iati-activity/@linked-data-uri, I’ve added:

An empty value for the attribute is treated the same as if the attribute is not present.

This text won’t appear on element pages – in fact, I’ve made a couple of other small text changes to distinguish attribute pages from element pages.