Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save allocation results #158

Open
cmutel opened this issue Dec 5, 2023 · 2 comments
Open

Save allocation results #158

cmutel opened this issue Dec 5, 2023 · 2 comments
Assignees

Comments

@cmutel
Copy link
Contributor

cmutel commented Dec 5, 2023

Here is an example of a return body:

{
  process: 35407,
  groups: [
    {
      name: 'Machine operations',
      technosphere: [
        976686,
        976691,
        976689,
        976681,
        976696,
        976690,
        976695,
        976687,
        976683
      ],
      biosphere: []
    },
    {
      name: 'Road construction and maintenance',
      technosphere: [
        976693
      ],
      biosphere: [
        976699,
        976704,
        976702
      ]
    },
    {
      name: 'Forestry',
      technosphere: [
        976682,
        976694
      ],
      biosphere: [
        976706,
        976701,
        976703,
        976700,
        976698,
        976705
      ]
    }
  ],
  allocation: [
    {
      product: 976684,
      groups: [
        {
          name: 'Machine operations',
          factor: 0.2
        },
        {
          name: 'Road construction and maintenance',
          factor: 0.4
        },
        {
          name: 'Forestry',
          factor: 0
        }
      ]
    },
    {
      product: 976685,
      groups: [
        {
          name: 'Machine operations',
          factor: 0.1
        },
        {
          name: 'Road construction and maintenance',
          factor: 0.3
        },
        {
          name: 'Forestry',
          factor: 0.5
        }
      ]
    },
    {
      product: 976688,
      groups: [
        {
          name: 'Machine operations',
          factor: 0.2
        },
        {
          name: 'Road construction and maintenance',
          factor: 0.2
        },
        {
          name: 'Forestry',
          factor: 0
        }
      ]
    },
    {
      product: 976692,
      groups: [
        {
          name: 'Machine operations',
          factor: 0.3
        },
        {
          name: 'Road construction and maintenance',
          factor: 0
        },
        {
          name: 'Forestry',
          factor: 0.1
        }
      ]
    },
    {
      product: 976697,
      groups: [
        {
          name: 'Machine operations',
          factor: 1
        },
        {
          name: 'Road construction and maintenance',
          factor: 1
        },
        {
          name: 'Forestry',
          factor: 1
        }
      ]
    }
  ]
}
@cmutel cmutel self-assigned this Dec 5, 2023
@lilliputten
Copy link
Collaborator

Is it the data format expected by the api endpoint from issue #157?

@cmutel
Copy link
Contributor Author

cmutel commented Dec 7, 2023

Is it the data format expected by the api endpoint from issue

This is what you currently show in the pop-up, based on our earlier discussions. It's fine, this issue is for me to save this data in the right way to the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants