Comments (5)
I'll have a look at parsing the foodnotes and give you feedback by friday evening.
Correctly adding the correct resources or hierachies to each concept can be really challenging because you could have overriding relationships. For example you could have a taxonomy (tax1) that defines the following relationship concept1 = concept_a + concept_b
and another taxonomy (tax2) that extends from the taxonomy tax1 and overrides the relationship concept1 = concept_a + concept_c + concept_d
.
But honestly, I'm not sure how often this is actually done in practice and i really agree that it would be helpful to have information about the concept object instance directly and not have to go through the whole object structure of the linkbase.
I'll think about how to implement this more easily in the current object structure.
from py-xbrl.
No you are not missing something.
I intentionally left the fact IDs out back then, since they are created by the filer and only serve for linking in the XBRL files. My goal at the time was to develop a parser that could convert the complex structure of XBRL into simple object structures and discard all unnecessary information to reduce complexity.
Theoretically if you store all the elements of the XBRL filing into a object structure, you would not need the id attribute.
But as you already noticed, the parser currently does not parse the footnotes and just ignores them.
Could you share the link/adsh of some samle submissions you are working with?
I will think about how to read the foodnotes in the course of the week. It would probably be most practical to simply add another attribute to the AbstractFact
class, which can store a foodnote.
from py-xbrl.
The 10K for PFE 2020 uses IDs to map a fact to a footnote:
In pfe-20201231_htm.xml
:
<pfe:OtherNonoperatingIncomeExpenseNet
contextRef="i40d8184605444a15897ab5244367c12b_D20200101-20201231"
decimals="-6"
id="id3VybDovL2RvY3MudjEvZG9jOmIyNDI2ZGVmNDYxMzQxNjRhOTZlY2UwMzI2ZmUxNzliL3NlYzpiMjQyNmRlZjQ2MTM0MTY0YTk2ZWNlMDMyNmZlMTc5Yl8xMTgvZnJhZzo4MWY1ODQzYjUyYzY0YjVmYmRkMzZlZGJmYWU2NjE1Yy90YWJsZTo2NDI1MzZlNzhhOWQ0NGQ4YTFjMzBhOGU4YWZiNGRhZS90YWJsZXJhbmdlOjY0MjUzNmU3OGE5ZDQ0ZDhhMWMzMGE4ZThhZmI0ZGFlXzE3LTItMS0xLTA_fea5b324-5464-4272-84ff-e4dea5a90241"
unitRef="usd">493000000</pfe:OtherNonoperatingIncomeExpenseNet>
<link:footnoteArc
xlink:arcrole="http://www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YzpiMjQyNmRlZjQ2MTM0MTY0YTk2ZWNlMDMyNmZlMTc5Yl8xMTgvZnJhZzo4MWY1ODQzYjUyYzY0YjVmYmRkMzZlZGJmYWU2NjE1Yy90ZXh0cmVnaW9uOjgxZjU4NDNiNTJjNjRiNWZiZGQzNmVkYmZhZTY2MTVjXzIyNTM5OTg4NDE2NDM0_e333fc41-2314-4474-b29f-ff3181d00b66" xlink:role="http://www.xbrl.org/2003/role/footnote" xlink:type="resource" xml:lang="en-US"><xhtml:span style="color:#000000;font-family:'Arial',sans-serif;font-size:7pt;font-weight:400;line-height:120%;padding-left:4.39pt">2020 includes, among other things, (i) dividend income of $278 million from our investment in ViiV and (ii) charges of $105 million, reflecting the change in the fair value of contingent consideration. 2019 included, among other things, (i) dividend income of $220 million from our investment in ViiV; (ii) charges of $152 million for external incremental costs, such as transaction costs and costs to separate our Consumer Healthcare business into a separate legal entity, associated with the formation of the Consumer Healthcare JV; and (iii) net losses on early retirement of debt of $138 million. 2018 included, among other things, (i) a non-cash $343 million pre-tax gain associated with our transaction with Bain Capital to create a new biopharmaceutical company, Cerevel, to continue development of a portfolio of clinical and preclinical stage neuroscience assets primarily targeting disorders of the central nervous system; (ii) dividend income of $253 million from our investment in ViiV; (iii) a non-cash $50 million pre-tax gain related to our contribution agreement entered into with Allogene (see </xhtml:span><xhtml:span style="color:#000000;font-family:'Arial',sans-serif;font-size:7pt;font-style:italic;font-weight:400;line-height:120%">Note 2B</xhtml:span><xhtml:span style="color:#000000;font-family:'Arial',sans-serif;font-size:7pt;font-weight:400;line-height:120%">); (iv) charges of $207 million, reflecting the change in the fair value of contingent consideration, and (vi) charges of $112 million for external incremental costs, such as transaction costs and costs to separate our Consumer Healthcare business into a separate legal entity, associated with the formation of the Consumer Healthcare JV.</xhtml:span></link:footnote>
I want to inspect the footnote for any nested facts. In the above example, "Other, net - $493" contains 2 more facts, so it's important to discount these to avoid double counting.
from py-xbrl.
If you could somehow link a fact to its footnotes that would be amazing. Another great feature btw is somehow linking a concept to all of its presentation/calculation locators. Very often I have to traverse the full linkbase in order to map a concept ID to a label, so having them available on the concept object itself would be 💯
This is quite important because very often companies get the balance wrong (e.g. credit or debit), or they use a negative value for something that should really be positive. So being able to inspect the label for words like (gain)
or (loss)
is required to correct things.
from py-xbrl.
I am currently working on a solution to parse the footnote links.
It would be great if the link:footnoteLink elements would be parsed with the same code I use in the linkbase module for parsing extended XLinks (because they are basically just extended XLinks). However, I still need to change and split off some code in the linkbase module so that I can reuse it for the footnote links in the instance document.
from py-xbrl.
Related Issues (20)
- Parsing Failures for Empty Fact Values and 'nil' Text in XBRL Documents HOT 2
- Support a New Taxonomy? HOT 1
- Parsing filings with empty imports HOT 3
- Issue with dateMonthDayYearEN function in Transformation __init__ file HOT 1
- xbrl.TaxonomyNotFound HOT 2
- parse_ixbrl does not close the file it opens HOT 4
- No support for embedded/inline schemas HOT 2
- Elements missing after parsing HOT 3
- maximum recursion depth exceeded in __instancecheck__ HOT 4
- Difference between pypi and github releases? HOT 2
- Infinite recursion loops with cyclic taxonomy imports. HOT 2
- Check differences between transformation registry version 4 and 5
- TaxonomyNotFound: The taxonomy with namespace http://xbrl.sec.gov/dei/2024 could not be found. Please check if it is imported in the schema file
- New taxonomy for 2024 HOT 2
- Index out of range HOT 1
- Add contextRef to Json parsing
- Add namespace to Concept
- Support for xbrldi:typedMember HOT 2
- Start getting 403 errors from sec.gov HOT 5
- Any way to link different facts together in a coherent way?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-xbrl.