Skip to contents

Queries the live availability manifest of Global Factor Data and returns the regions and selectors that can be passed to download_data_jkp().

Usage

list_supported_jkp_factors(region = NULL, dataset = "factors")

Arguments

region

Optional. A region or country code. If provided, the function returns the selectors (factor codes, or industry classifications when dataset = "industry") available for that region. If NULL (the default), it returns the available region codes.

dataset

The Global Factor Data product to query, one of "factors" (default), "portfolios", or "industry".

Value

A tibble. When region is NULL, it has a single region column listing the available region codes. When region is provided, it has a region column and a factor column listing the selectors (factor codes, or industry classifications when dataset = "industry") available for that region.

Examples

# \donttest{
  list_supported_jkp_factors()
#> # A tibble: 102 × 1
#>    region       
#>    <chr>        
#>  1 all_countries
#>  2 all_regions  
#>  3 are          
#>  4 arg          
#>  5 aus          
#>  6 aut          
#>  7 bel          
#>  8 bgd          
#>  9 bgr          
#> 10 bhr          
#> # ℹ 92 more rows
  list_supported_jkp_factors("usa")
#> # A tibble: 169 × 2
#>    region factor     
#>    <chr>  <chr>      
#>  1 usa    accruals   
#>  2 usa    age        
#>  3 usa    aliq_at    
#>  4 usa    aliq_mat   
#>  5 usa    all_factors
#>  6 usa    all_themes 
#>  7 usa    ami_126d   
#>  8 usa    at_be      
#>  9 usa    at_gr1     
#> 10 usa    at_me      
#> # ℹ 159 more rows
  list_supported_jkp_factors("usa", dataset = "portfolios")
#> # A tibble: 154 × 2
#>    region factor     
#>    <chr>  <chr>      
#>  1 usa    age        
#>  2 usa    aliq_at    
#>  3 usa    aliq_mat   
#>  4 usa    all_factors
#>  5 usa    ami_126d   
#>  6 usa    at_be      
#>  7 usa    at_gr1     
#>  8 usa    at_me      
#>  9 usa    at_turnover
#> 10 usa    be_gr1a    
#> # ℹ 144 more rows
# }