View source: R/cansim_changed_series.R
| get_cansim_changed_series_data_for_vectors | R Documentation |
Retrieve the data points Statistics Canada changed for the given vectors. Series among the ones asked about that did not change contribute no rows, and if none of them changed the result is an empty table rather than an error. The StatCan API can only process 300 vectors at a time, if more than 300 vectors are specified the function will batch the requests to the API.
get_cansim_changed_series_data_for_vectors(
vectors,
language = "english",
timeout = 200,
factors = TRUE,
default_month = "07",
default_day = "01"
)
vectors |
The list of vectors to retrieve changed data for |
language |
|
timeout |
(Optional) Number of seconds StatCan is allowed to go without sending data before the download is abandoned, to work around scenarios where StatCan servers drop the network connection. This does not limit how long a download may take overall, a transfer that keeps delivering data is left alone. StatCan prepares a whole response before sending any of it, which for large requests can take the better part of a minute, so values much below the default of 200 risk cutting off legitimate requests. |
factors |
(Optional) Logical value indicating if dimensions should be converted to factors. (Default set to |
default_month |
The default month that should be used when creating Date objects for annual data (default set to "07") |
default_day |
The default day of the month that should be used when creating Date objects for monthly data (default set to "01") |
A tibble with the changed data for the specified vector(s)
Returns NULL if the data could not be retrieved because StatCan is unavailable.
## Not run:
get_cansim_changed_series_data_for_vectors("v41690973")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.