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
16 0 1 3

Controversy details extraction

We are having issues extracting controversy details using the Eikon python API. When querying for General Electrics alone we get 11 controversy details, but querying at the same time for GE and other company we get less controversy details

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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
16 0 1 3

An example of the problem can be reproduced using the following code:

# Output for the fields
outputs = [
    "fperiod",
    "esgsourcetitle",
    "esgsourcedate",
    "esgsourcepublisher",
    "esgsourceurl",
    "esgsourceabstract",
]
# Set parameters
params = {
    "AddSource": True,
    "EDate": -2,
    "Period": "FY0",
    "Frq": "FY",
    "CH": "Fd",
    "RH": "IN",
}

# Metrics 
controversies = ['TR.ControvEnv',
 'TR.RecentControvEnv',
 'TR.ControvCopyrights',
 'TR.ControvPublicHealth',
 'TR.ControvBusinessEthics',
 'TR.ControvTaxFraud',
 'TR.ControvAntiCompetition',
 'TR.ControvCriticalCountries',
 'TR.RecentControvPublicHealth',
 'TR.RecentControvBusinessEthics',
 'TR.RecentControvTaxFraud',
 'TR.RecentControvAntiCompetition',
 'TR.RecentControvCriticalCountries',
 'TR.RecentControvCopyrights',
 'TR.ControvHumanRights',
 'TR.ControvFreedomofAssociation',
 'TR.ControvChildLabor',
 'TR.RecentControvHumanRights',
 'TR.RecentControvChildLabor',
 'TR.ControvConsumer',
 'TR.RecentControvConsumer',
 'TR.ControvCustomerHS',
 'TR.ControvResponsibleRD',
 'TR.ControvPrivacy',
 'TR.ControvRespMarketing',
 'TR.ControvProductAccess',
 'TR.ProductRecall',
 'TR.RecentControvPrivacy',
 'TR.RecentControvRespMarketing',
 'TR.RecentControvProductAccess',
 'TR.RecentControvResponsibleRD',
 'TR.ControvDiversityOpportunity',
 'TR.RecentControvDiversity',
 'TR.MgtDepartures',
 'TR.ControvWorkingCondition',
 'TR.RecentControvWorkingCondition',
 'TR.ControvEmployeesHS',
 'TR.RecentControvEmployeesHS',
 'TR.ControvMgtComp',
 'TR.ControvRecentMgtComp',
 'TR.ControvShareholders',
 'TR.RecentControvShareholders',
 'TR.ControvInsiderDealings',
 'TR.ControvAccounting',
 'TR.RecentControvInsiderDealings',
 'TR.RecentControvAccounting']

metrics = [c + '.' + o for o in outputs for c in controversies]
features = [{m:{'params':params}} for m in metrics

If i make the API call for several companies:

ek.get_data( ['US3696041033','US0378331005'], features)  

I get 5 controversies for ISIN US3696041033, while making the call one-by-one, I get 11


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.

Upvotes
32.2k 40 11 19

Hello @jaime.oliver,

We have tested this request, and it looks like the discrepancy in the number of controversies tat you were observing previously, was fixed on the back end.

Could you please verify on your side?

Thanks,

-AHS

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.

Upvotes
16 0 1 3

I have tested the same code and still get the discrepancy

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.

Upvotes
1 0 0 0

Can I get the complete code for extracting the ESG Controversies with Metric, starting Fy, ending FY, and ticker as parameters @jaime.oliver

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.