Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 0 2

Emissions by NAICsCode and Period

Is it possible to pull and group the global values of TR.AnalyticEstimatedCO2Total and TR.Revenue (as USD or GBP) into groups of TR.NAICSSector and by Year, or at least show which year the data is coming from?

ek.get_data seems to only be able to pull data by instrument, and am having some difficulty showing year and currency information as well.

#technology#contentesgapi-playgroundtimemarket
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
Accepted
80.3k 259 52 75

@lcheu

Thanks for reaching out to us.

You can get a date from the Date property, such as TR.Revenue.Date and TR.AnalyticEstimatedCO2Total.Date and you can also specify the currency in the TR.Revenue field, such as TR.Revenue(Curn=EUR).

The code looks like this:

df,err = ek.get_data(['0#.NDX'],
                     ['TR.Revenue.Date',
                      'TR.Revenue(Curn=EUR)',
                      'TR.Revenue(Curn=USD)',
                      'TR.NAICSSector',
                      'TR.AnalyticEstimatedCO2Total',
                      'TR.AnalyticEstimatedCO2Total.Date'])
df

The output is:

1676009313986.png

After that, you can use dataframe methods to manipuate the data.

I hope that this information is of help.


1676009313986.png (49.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thank you for that information.

Can I ask some follow up queries?

  • where can I get a full list of Chain RICs?
  • is there a way to aggregate data across all instruments?
  • I am not sure how to find the ".Date" or "Curn" (is this termed as Level 2 data?) within the Data Item Browser. Can you advise?
  • If I want to get the Fiscal Date/Fiscal Year instead of the Date the data is reported (which is what TR.Revenue.Date returns) what is the "." Level 2 that I need to use?
  • For Currency Conversions, what is the basis of the FX Rate?

Thank you again

Upvote
80.3k 259 52 75

@lcheu

For the availaibility of the content and rate conversion, please contact the Eikon support team direclty via MyRefinitiv. The get_data method can retrieve the same data as the =TR function in Eikon Excel.

I ran the code and got the following output.

1676276451103.png

To get RICs, you can contact the content support team via MyRefinitiv or use the RIC Search tool.


1676276451103.png (40.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.