Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds asymmetric SAM data (clean PR) #51

Merged
merged 1 commit into from
Nov 2, 2023
Merged

Conversation

eliocamp
Copy link
Contributor

@eliocamp eliocamp commented Nov 2, 2023

This adds the asymmetric and symmetric SAM indices.

I called the functions "asymsam", from "asymmeric SAM", but let me know if you want me to change them.

library(rsoi)

download_asymsam_monthly() |> 
  head()
#>   Lev Index       Date       Value Value_normalized
#> 1   1   sam 2023-09-01  0.05177943       0.14952028
#> 2   1  ssam 2023-09-01  0.43155471       0.06490490
#> 3   1  asam 2023-09-01 -0.37977528       0.21935814
#> 4   2   sam 2023-09-01  0.04575554       0.22199278
#> 5   2  ssam 2023-09-01  0.54510591       0.09215533
#> 6   2  asam 2023-09-01 -0.49935037       0.24345311


download_asymsam_daily(levels = c(700, 500)) |> 
  head()
#> Downloading level: 700
#> Downloading level: 500
#>   Lev Index       Date       Value    R.squared
#> 1 700  asam 1940-01-01 -0.13508871 0.0426478529
#> 2 700   sam 1940-01-01 -0.12471444 0.0054371573
#> 3 700  ssam 1940-01-01  0.01037427 0.0000442406
#> 4 700  asam 1940-01-02 -0.11471232 0.0345327849
#> 5 700   sam 1940-01-02  0.02685265 0.0002830512
#> 6 700  ssam 1940-01-02  0.14156497 0.0092506011

Created on 2023-10-30 with reprex v2.0.2

Closes #47

@boshek
Copy link
Owner

boshek commented Nov 2, 2023

Thank you for this!

@boshek boshek merged commit 1a6ce88 into boshek:master Nov 2, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add asymmetric SAM index
2 participants