visualisation-tool icon indicating copy to clipboard operation
visualisation-tool copied to clipboard

Handle BODS 0.4 data

Open codemacabre opened this issue 1 year ago • 5 comments

Add multiple conditionals to check version number & adjust property names accordingly. Tests for 0.4 data while maintaining compatibility with earlier versions.

Closes #151

codemacabre avatar Aug 15 '24 14:08 codemacabre

I've done considerable testing of the 0.3 and 0.4 example data but due to my inexperience with the data standard, it might be better for others to review that this is outputting expected visualisations.

Here is the 0.4 example data for Fermcat, for example:

bods

...which at a cursory glance looks to render without issues, but on inspection the ownership adds up to 200% - is this expected?

codemacabre avatar Aug 16 '24 09:08 codemacabre

Similarly with Tecido, which adds up to 110%: bods2

codemacabre avatar Aug 16 '24 09:08 codemacabre

I think I solved it by checking for 'closed' records and cross-checking closed relationships' interestedParty ids. The output for changes over time are now as follows:

bods bods2

codemacabre avatar Aug 16 '24 15:08 codemacabre

Those images are definitely correct now, good work @codemacabre :)

I'll leave it to @rhiaro or @radix0000 to review the code itself

kathryn-ods avatar Aug 16 '24 15:08 kathryn-ods

Just to clarify (for the record), the Tecido and Fermcat example BODS files show how a set of BODS statements can represent changing beneficial ownership over time.

I think I solved it by checking for 'closed' records and cross-checking closed relationships' interestedParty ids.

Your solution (for the problem of out-of-date information being represented alongside current information) means that only the latest set of information in the dataset is visualised. (Which is fine!)

There is a separate issue (#141) in the second sprint which will enable a more refined handling of datasets with a time dimension.

kd-ods avatar Aug 19 '24 14:08 kd-ods

Thanks @radix0000 I've changed the version checks to include versions >= 0.4.

I believe annotations are on the list of things to do, perhaps as an enhancement after https://github.com/openownership/visualisation-tool/issues/55 has been completed.

codemacabre avatar Aug 27 '24 11:08 codemacabre