Klimatbyran / beta

New repo for new layout
2 stars 3 forks source link

Biogenic emissions missing #161

Open Almendra-ab opened 4 days ago

Almendra-ab commented 4 days ago

Companies with biogenic emissions recorded are not reflected on site

Example: https://beta.klimatkollen.se/foretag/alleima-Q115112945 Should have 16,598 tonnes of biogenic emissions

Greenheart commented 4 days ago

There are two parts of this problem:

1) This probably happens because we pick the first data source that is defined and then use it for all data points. E.g. if either facit or wikidata is available, that will be used as the source for all data points.

What we need instead would be to do the same lookup checking each source (facit, wikidata and finally the AI generated data) for every data point, and getting the best possible answer. This would allow getting biogenic emissions from one source, total emissions from another and other data points from other sources.

2) The long term solution is to move this logic to the backend, to combine all data into a common structure and clarify what is verified or not.

Greenheart commented 3 days ago

To fix this, we need to add biogenic emissions to findFacit(), update types for both the garbo and beta repos, update frontend code to use the correct biogenic emissions numbers.

Greenheart commented 3 days ago

@Almendra-ab Frontend done. What remains now is to get the company data returned by the API to actually include the biogenic emissions from the facit. One example that works: https://beta.klimatkollen.se/foretag/astrazeneca-Q731938

However, this one doesn't yet work since we need a newer approved report for this company to override the current version which doesn't include biogenic emissions. https://beta.klimatkollen.se/foretag/alleima-Q115112945

One way to fix the remaining company pages without biogenic emissions is to re-run the reports for the affected companies and approve new versions. This workflow clearly needs to be improved in the coming months, since we should be able to expect the latest facit data to immediately go live without further manual updates.