Skip to contents

This function scraps etf.com data for sector breakdown on ETFs. Use splot_etf() for visualization.

Usage

etf_sector(etf = "VTI", quiet = FALSE, cache = TRUE)

Arguments

etf

Character Vector. Which ETFs you wish to scrap?

quiet

Boolean. Keep quiet? If not, message will be shown.

cache

Boolean. Use daily cache if available?

Value

data.frame with ETF break.down data by sector

Examples

# \donttest{
etf_sector(etf = "VTI")
#> >>> Downloading sectors for each ETF...
#> # A tibble: 22 × 3
#>    Sector                 Percentage ETF  
#>    <chr>                       <dbl> <chr>
#>  1 Technology Services         19.8  VTI  
#>  2 Electronic Technology       16.7  VTI  
#>  3 Finance                     13.3  VTI  
#>  4 Health Technology            9.04 VTI  
#>  5 Retail Trade                 7.67 VTI  
#>  6 Producer Manufacturing       4.34 VTI  
#>  7 Consumer Non-Durables        4.11 VTI  
#>  8 Consumer Services            3.31 VTI  
#>  9 Energy Minerals              3.16 VTI  
#> 10 Commercial Services          2.77 VTI  
#> # ℹ 12 more rows
# }