Skip to content

feat(data-ingestion): Refactor consolidate needs function in the add-needs script #347

@ll-zerr

Description

@ll-zerr

The current consolidateNeedsByRegion function in the add-needs.ts file of src/scripts/import-needs-assessment-data does not utilize a Set to create a unique array of objects (removing any duplicates from the data). When this approach was initially applied, non-duplicates were showing up as duplicates due to the nesting involved in the Product property. It has since been confirmed that there are only 10 true duplicates noted in the current data (needs-data.json).

Issue goal:

  • - Refactor the function to utilize a Set, if possible
  • - Test the accuracy with the full data set (needs-data.json)

See comment in PR#345

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions