UNMigration / HTCDS

Human Trafficking Case Data Standard
Other
19 stars 6 forks source link

methodsOfControl property should be singular ie. "methodOfControl" #26

Open 0xdir opened 1 year ago

0xdir commented 1 year ago

Referring to the schema: https://hapi.etica.ai/eng-Latn/data-schema/UN/HTCDS/HTCDS.json

      "vic_MethodsOfControl": {
                  "description": "Methods of Control",
                  "type": "string", 
                   ... 
      }

Problem: From the property name, there could be multiple methods of control (plural). However the schema defines the expected type as "string". This causes confusion if multiple methods of control are required, should the developer:

  1. disregard the schema and use array of strings? [method1, method2]
  2. follow the schema and concat multiple methods together eg. method1; method2

This is undesirable for data interoperability and sharing.

Proposal: Change the method name to singular "vic_MethodOfControl"

fititnt commented 1 year ago

Hi @0xdir

The link https://hapi.etica.ai/eng-Latn/data-schema/UN/HTCDS/HTCDS.json is actually generated from another (not related to UNMigration nor HTCDS) format of this repository, but that is not the authoritative version. How that file was generated is mentioned here https://github.com/HXL-CPLP/Auxilium-Humanitarium-API/issues/15 .

Maybe do a quick look if this is a suggestion on UNMigration/HTCDS repository (the file was https://github.com/UNMigration/HTCDS/blob/master/Toolkit/Survey/htcds_xlsform.xlsx, which if I remember was updated between last time I released the eng-Latn/data-schema/UN/HTCDS/HTCDS.json) to this issue might not be applicable to UNMigration/HTCDS, but by fault.

I could quickly change that on the other repo if you believe it better reflects the authoritative version. The directory with the templates to generate the output are here https://github.com/HXL-CPLP/Auxilium-Humanitarium-API/tree/main/schemam/UN/HTCDS

Proposal: Change the method name to singular "vic_MethodOfControl"

I haven't done a full check of what it's saying, but I'm under the impression it's just updating that data schema, not the field name.

fititnt commented 1 year ago

Ah, I just noticed the https://github.com/0xdir/htcds_dart/tree/master/lib. Great!

The data schemas are good to get a general idea, but anyway, you would need to do copy and paste to dart code. From the reference XLSX files, I had to also copy and paste to the JSONs. Also, while the major done was before v1.0 (the current version is 2.0, and the ported version which you based your code is v0.2) it may still have some small differences. So for example, you might want to review your library against the lastest https://github.com/UNMigration/HTCDS.

If after that you know somewhat what is missing from the https://hapi.etica.ai/eng-Latn/data-schema/UN/HTCDS/HTCDS.json, I would welcome the suggestion (even if not with the templated files, but something I could port in the future).

0xdir commented 1 year ago

Hi @fititnt , thank you for the clarification! I'll update my dart library to reflect v2.0.

After reviewing the files, I would propose to make the change on the authoritative version (if possible), and cascade down the change to the template/generated/ported files (eg. reference XLSX files, json, dart lib). I feel the singular form is more aligned to the other fields eg. MethodOfRecruitment, TypeOfExploitation, which are both multiselect also.