I would need something like ek.get_rics(oil refineries, region="world") which would output a list of rics of all oil refineries in the world.
I tried using the interactive oil map, made a layer on refineries and export that to excel. Yes, you get a list of tickers, but only those currently zoomed on the map. And if you zoom out to get the world, you get a summarizing table containing the # of OR's per continent/country.
Hi @ana.ramirezcervera Thanks for your question. You need to use the search API endpoint from the Refinitiv Data Platform - which is accessible using your eikon appkey - or from within the codebook app.
import refinitiv.dataplatform as rdp rdp.open_desktop_session('YOUR APP KEY HERE') import eikon as ek ek.set_app_key('YOUR APP KEY HERE') dfRic = rdp.search( view = rdp.SearchViews.PhysicalAssets, filter = "RCSAssetTypeLeaf eq 'oil refinery'", #and RCSRegionLeaf eq 'United States' top=10000 ) display(dfRic)
You could then take that list and get other pertinent information eg:
df, err = ek.get_data(instruments = dfRic['RIC'].astype(str).values.tolist(),fields =["TR.AssetName","TR.AssetLocation","TR.AssetLongitude","TR.AssetLatitude"]) df
I hope this can help.
Thanks for you answer.
When running the above code, I get the following error.
Session session - Thread 20140 | MainThread Error: no proxy address identified. Check if Desktop is running.
Desktop application is running (Eikon package works perfectly)
Python version: 3.8.3
When I try making connection directly to the Refinitiv Data Platform (as described on https://pypi.org/project/refinitiv-dataplatform/) I get the following error.
2020-10-15 10:07:25,980 - Session session.platform - Thread 20140 | MainThread EDP Authentication failed. Error code -1 | AttributeError("'Request' object has no attribute 'prepare'")