justetf-scraping
justetf-scraping copied to clipboard
Scraping country allocation and sectors?
Hello guys is there any way to extract the country allocation and sectors?
Hi @daniele96l,
country is already built in, just use alpha-2 code:
import justetf_scraping
justetf_scraping.load_overview(country="GB")
... 82 rows × 42 columns
or the country name:
justetf_scraping.load_overview(country="England")
... 82 rows × 42 columns
Sectors aren't yet built in. You'll have to adjust it in get_etf_params in justetf_scraping/oveview.py file. Add etf_params += "§or=<sector>", e.g. etf_params += "§or=Technology" at the end of the function to achieve this.