msperlin/simfinR

simfinR_get_available_companies: call company_sector, too?

kschulzke opened this issue · 2 comments

The function, simfinR_get_available_companies, produces a 3-column table comprising the variables simid, ticker, and name. See attached screen cap.

It would be very helpful to also include the company_sector variable in the function output.

image

Hi Jedijd,

The information about sectors is not available in a call to the "List available companies" API, meaning that I cant get that information in a single call to the API.

The only way to gather all sectors is by making a single call to every company:

`
library(simfinR)
library(tidyverse)

df_info1 <- simfinR_get_available_companies(api_key)
df_info2 <- bind_rows(lapply(df_info_companies$simId, simfinR_get_info_company,
api_key = api_key))
`

I'll talk to the guys at simfin and check wheter they can help us.

Best,

Another way, have a look here:

https://simfin.com/data/find/companies

You can download a spreadsheet with all sector and companies id.