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

WIP - Add exploration of fetching values from online CSRD report #47

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mrchrisadams
Copy link
Member

@mrchrisadams mrchrisadams commented Dec 9, 2024

This PR contains sample code for fetching a data point from an online CSRD report, that follows the European Sustainability Reporting Standards.

I've uploaded one of the sample example CSRD reports that EFRAF published onto a gist on github at:

https://gist.githubusercontent.com/mrchrisadams/fb14e79d2d52977255c0b1db6de86726/raw/5536eb17470125912a62684789df35a440dbed4a/efrag-2026-12-31-en.xhtml

This is simulates a published CSRD report being online at a remote URL to download,.

The code is now parses it and pulls out the value we care about from the report - it should be a value of something like 23%.

how are finding it

So, for now we're looking for one of the values we list in issue #44 :

E1 	E1-5 	AR 34 	Percentage of renewable sources in total energy consumption

In Arelle-speak, this is called:

esrs:PercentageOfRenewableSourcesInTotalEnergyConsumption

So we're filtering the list of returned 'facts' in a parsed document, to only return the one we care about, and then returning the value.

Making this more human friendly

It looks like the returned 'fact' does not have a nice easy to read name like E1-5 Percentage of renewable sources in total energy consumption.

We probably want to maintain a mapping between this specific identifier esrs:PercentageOfRenewableSourcesInTotalEnergyConsumption inside the system and the slightly more human friendly E1-5 Percentage of renewable sources in total energy consumption, that we want to expose to people.

We also likely want to maintain a list of possible mappings, between Arelle and a human friendly representations, particularly when we want to choose between the various other values in listed in #44 .

Acceptance criteria

This wil be considered done when we have

  • We have tests for the happy case of fetching esrs:PercentageOfRenewableSourcesInTotalEnergyConsumption from a CSRD report
  • We have tests for there being no value (we do not distinguish between materiality - right now).
  • We have our CSRD processor class working according to our architecture, where we are working with datastructures or URLs fetched and parsed already out of a carbon.txt file are parsed along to it

Final note - I found out that Arelle already knows how to fetch remote CSRD files if they're reachable via http/ https. I had assumed our parser might need to fetch the files first, and then pass along downloaded files to a CSRD processor, for parsing to Arelle. It might actually make sense to just pass along the url of the CSRD report, assuming Arelle's handling logic works how we expect it to.

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

Successfully merging this pull request may close these issues.

1 participant