Title: | Provide R Client to the Bank of Canada's Valet API |
---|---|
Description: | The Bank of Canada updated their Valet API <https://www.bankofcanada.ca/valet/docs>, and no R client currently exists. This provides access to all of Valet's endpoints and serves responses in wide format easy for researchers to handle but also provides tools to access API responses as a list. |
Authors: | Corey Runkel [aut, cre] |
Maintainer: | Corey Runkel <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.9.0 |
Built: | 2024-11-05 03:41:49 UTC |
Source: | https://github.com/runkelcorey/valet |
get_details
returns metadata from a Bank of Canada series or series
group.
get_details(name = NULL, group = FALSE)
get_details(name = NULL, group = FALSE)
name |
A character of length 1 indicating the series or series group for which information should be retrieved. |
group |
A Boolean indicating whether the |
A list of series or group details.
get_details("CES_C4E_LOSE_JOB_SK") ## Not run: get_details("BAPF_TRANSACTION_DATA") ## End(Not run) get_details("BAPF_TRANSACTION_DATA", group = TRUE)
get_details("CES_C4E_LOSE_JOB_SK") ## Not run: get_details("BAPF_TRANSACTION_DATA") ## End(Not run) get_details("BAPF_TRANSACTION_DATA", group = TRUE)
get_group
returns observations from a Bank of Canada series group.
get_group(name = NULL, ...)
get_group(name = NULL, ...)
name |
A |
... |
Additional query parameters. Possible values are |
Valet, the server-side API, does not always return observations filtered by ... arguments for series groups, even if it will accept the request.
A tibble
.
get_group("BAPF_TRANSACTION_DATA") get_group("gbpp") ## Not run: #this is a series get_group("FXCADAUD") ## End(Not run)
get_group("BAPF_TRANSACTION_DATA") get_group("gbpp") ## Not run: #this is a series get_group("FXCADAUD") ## End(Not run)
get_list
returns metadata about all Bank of Canada series or series
groups.
get_list(type = c("series", "groups"))
get_list(type = c("series", "groups"))
type |
Either |
A tibble
of series or group information.
get_series
returns observations from one or more Bank of Canada
series, subject to some date filtering.
get_series(name = NULL, ...)
get_series(name = NULL, ...)
name |
A |
... |
Additional query parameters. Possible values are |
A tibble
of size .
get_series("FXCADAUD") ## Not run: #this is a group get_series("BAPF") ## End(Not run)
get_series("FXCADAUD") ## Not run: #this is a group get_series("BAPF") ## End(Not run)
valet
is the core back-end to get responses from the Bank of Canada
API.
valet(name = NULL, group = FALSE, ...)
valet(name = NULL, group = FALSE, ...)
name |
A character of at least length 1 indicating the series or series group to retrieve. |
group |
Boolean indicating whether the |
... |
Query parameters from other methods. |
A valet
object.
valet(name = "GBPP", group = TRUE, recent_weeks = 2)
valet(name = "GBPP", group = TRUE, recent_weeks = 2)