How to download the carbon (CO2) emission data for companies around the world (especially, the compa

Customer is looking to download the carbon (CO2) emission data for companies around the world (especially, the companies in the US, Europe and Asia) from 2000 to 2022? If possible to get python code for API for the downloading.

Best Answer

  • raksina.samasiri
    Answer ✓

    Hi @navamani.p ,

    The CodeCreator application provided in Eikon Desktop/Refinitiv workspace can be used to create the Python code for this. To access it, type 'CODECR' in the Eikon search bar, and after the CodeCreator app is launched, please follow the explanation of steps in the screenshot below

    1. Put the RICs in the instruments field
    2. The data item can be searched here, I put 'ESG Score' and the result shown
    3. Click on the field name to add it to the code
    4. Click Parameters & Quick Functions to apply parameters
    5. Here I select the Last 5 FY (Fiscal Year). You can apply other parameters here as well
    6. Click this to copy code into the clipboard

    1689764895974.png

    Then you can paste the code on any Python compiler, you can also use CodeBook application in Eikon Desktop/Refinitiv Workspace as well, the result is

    1689765211488.png

    Please note that I adjust the code a bit to retrieve the data date

    import refinitiv.data.eikon as ek

    ek.set_app_key('DEFAULT_CODE_BOOK_APP_KEY')

    df, err = ek.get_data(
    instruments = [
    'AAPL.O',
    'MSFT.O'
    ],
    fields = ['TR.TRESGScore.date', 'TR.TRESGScore'],
    parameters = { 'Period': 'FY0', 'Frq': 'FY', 'SDate': '0', 'EDate': '-4'}
    )

    display(df)

    hope this helps and please let me know in case you have any further questions