(re) - Revenue per a specific group of countries

Options

Hi !

How does one use the TR.CoRRevenueFraction

I am trying to retrieve the % of revenue a list of companies make in a list of specific countries.

My countries are stored in List_Of_Countries.xlsx, while my ISINs in List_Of_ISIN.xlsx.

I've tried the usual way of retrieving data through the API and CodeBook, but it seems not to work.

import refinitiv.data as rd

import pandas as pd
rd.open_session()

countries = pd.read_excel("List_Of_Countries.xlsx")
isin= pd.read_excel("List_Of_ISIN.xlsx")
display(countries)
display(isin)

isin_list = isin['Unnamed: 0'].iloc[1:].tolist()
countries_list = countries.iloc[0, :].tolist()

GeoRaw = rd.get_data(
universe = isin_list,
fields = ['TR.CoRRevenueFraction'],
parameters = countries_list
)

display(GeoRaw)

Do you know how one should use the TF.CoRRevenueFraction function in CodeBook.

Thanks !

(Also, does a function for retrieve Revenue per Region exist? Something like TR.CoRRevenueFractionPerRegion) Thanks !

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @MyScreenName

    You can use the Data Item Browser tool to search for fields and parameters.

    Otherwise, please contact the helpdesk support team directly via LSEG Support and ask for the Excel formula, such as =RDP.Data that can be used to retrieve the required data.

    Then, we can help you converting that formula to Python code.

Answers

  • Gurpreet
    Gurpreet admin
    edited July 29

    Hello @MyScreenName

    The format of parameters in your API call is incorrect. It should be like -

    ld.get_data('IBM', fields=['TR.CoRRevenueFraction', 'TR.CoRRevenueFraction.countryname'], parameters={'CountryCode': 'CA,US,GB,AU'})
    
    image.png

    For other content question please contact LSEG MyAccount.

  • Hello Gurpreet,

    Thank you for your help !

    And what about geographical regions ? like Europe, Asia…

    Do you have such formula ?

    Thanks!

    Bests,

    Victor