open-contracting / standard-development-handbook

A guide for authors of the Open Contracting Data Standard
http://ocds-standard-development-handbook.readthedocs.io/en/latest/
Other
6 stars 3 forks source link

Schema style guide: add note on calculated/derived fields and the risk of inconsistent data #253

Closed duncandewhurst closed 2 years ago

duncandewhurst commented 2 years ago

If I remember correctly this has come up a few times in modelling discussions, but it isn't documented in the style guide.

@jpmckinney - please could you add something?

jpmckinney commented 2 years ago

Which part of this is different from #254? Could you add a link to a relevant discussion?

duncandewhurst commented 2 years ago

I'm struggling to find an example, but I think it's come up before when a publisher has wanted to add a field that aggregates the values of other fields.

duncandewhurst commented 2 years ago

I realised it would be helpful to include the example that prompted this issue: Assam's procurement data (CRM-7628) includes 3 fields related to bid opening:

I'm assuming that, in OCDS, we would recommend only including the opening dates and leave it to the user to calculate the number of days between them.

jpmckinney commented 2 years ago

Yes - we only include calculated fields in cases where it's often the case that only the calculated value is known or publishable, like the number of tenderers.