You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know this isn't relevant to your code, but is there any way to figure out what report each fact belongs to, and the order in which the facts should be displayed?
The text was updated successfully, but these errors were encountered:
Hi @jeffmarshall. It's pretty buried, but it's there. When using the get_company_facts method, the report is listed in the form field. I don't know how you're pulling the data, but I find it easiest to write the output to a json file, and then open the json in either a browser or an IDE, which will allow you to expand and collapse fields to see the nesting more easily. I've provided a little code snippet below to do that, but the "form" field is nested as follows, using the first taxonomy (dei) and tag (EntityCommonStockSharesOutstanding) as an example:
This structure repeats under different taxonomies and different tags, also.
In a Python IDE or REPL you can run:
cik = "789019" # Microsoft
company_facts = edgar.get_company_facts(cik=cik)
with open('<path>/company_facts.json', 'w') as outfile:
json.dump(company_facts, outfile)
The output looks something like this (this is just the head):
{
"cik": 789019,
"entityName": "MICROSOFT CORPORATION",
"facts": {
"dei": {
"EntityCommonStockSharesOutstanding": {
"label": "Entity Common Stock, Shares Outstanding",
"description": "Indicate number of shares or other units outstanding of each of registrant's classes of capital or common stock or other ownership interests, if and as stated on cover of related periodic report. Where multiple classes or units exist define each class/interest by adding class of stock items such as Common Class A [Member], Common Class B [Member] or Partnership Interest [Member] onto the Instrument [Domain] of the Entity Listings, Instrument.",
"units": {
"shares": [
{
"end": "2009-10-19",
"val": 8879121378,
"accn": "0001193125-09-212454",
"fy": 2010,
"fp": "Q1",
"form": "10-Q",
"filed": "2009-10-23",
"frame": "CY2009Q3I"
},
I know this isn't relevant to your code, but is there any way to figure out what report each fact belongs to, and the order in which the facts should be displayed?
The text was updated successfully, but these errors were encountered: