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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
18 0 0 2

Calculating ratio of each geographic segment revenue to total revenue (geographic Herfindahl index)

Hi All, just find a little problematic to calculate the ratio of each geographic segment revenue to the total revenue for a instrument. While I am able to retrieve all geographic segment revenue data by TR.BGS.GeoTotalRevenue, I am thinking to code (by Python/R/Excel) to divide each geographic segment revenue by total revenue directly. The manual calculation is relatively time consuming. I appreciate your generosity of sharing any suggestions and thoughts. Many thanks. Jason

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikon
icon clock
10 |1500

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

1 Answer

Upvote
Accepted
6.7k 8 6 7

@J.Wang2 try this:

df,err = ek.get_data('VOD.L',['TR.BGS.GeoTotalRevenue.segmentName','TR.BGS.GeoTotalRevenue'])

df['Rev_pct'] = (df['Geographic Total Revenues (Calculated)']/df['Geographic Total Revenues (Calculated)'].iloc[-1])*100

df

1628768583617.png

I don't think it can be simplified further than this.


1628768583617.png (106.0 KiB)
icon clock
10 |1500

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

@jason.ramchandani Many thanks. that is helpful, but It seems to still require manual processing. Unfortunately, Eikon doesn't provide individual segment revenue separately.

Much appreciated.

Click below to post an Idea Post Idea