fjuniorr / flowmapper

Mappings between elementary flows
MIT License
0 stars 1 forks source link

`mapping.json` needs to give complete source object #36

Closed cmutel closed 6 months ago

cmutel commented 7 months ago

Given a source object (from database-1.json):

  {
    "name": "Iodine-131",
    "context": [
      "Emissions to water",
      ""
    ],
    "unit": "kBq"
  },

The mapping produced is:

  {
    "source": {
      "name": "Iodine-131",
      "context": [
        "Emissions to water",
        ""
      ]
    },
    "target": {
      "uuid": "618c3a74-5b36-4d8a-b94f-26b8270448f8",
      "name": "Iodine-131",
      "context": "water/unspecified",
      "unit": "kBq"
    },
    "conversionFactor": 1,
    "comment": "Identical names"
  },

That's correct, but could fail in the future because it doesn't specify the source unit. We have already seen the value for this column can vary, and different units would require different conversion factors.