| sidra_split | R Documentation |
Divides one explicit query dimension without downloading values. The
resulting batches can be executed with sidra_collect(). Special selectors
such as all, allxt, first, and last must first be resolved to
explicit codes. Each vector element must represent one member; embedded
comma lists and period ranges are rejected because their cardinality cannot
be enforced by size.
sidra_split(
query,
by = c("period", "variable", "geo.filter", "category"),
size,
index = 1L
)
query |
A structured |
by |
One of |
size |
Maximum number of selected members in each batch. |
index |
For list-valued |
Geographic filters can be split only when the query requests one non-Brazil geographic level. Queries with multiple territorial levels are rejected because unchanged levels would overlap across batches. Classifications already resolved in the original URL are reused without another metadata request.
An object of class sidra_batch containing disjoint queries in
their original order.
sidra_query(), sidra_plan(), sidra_collect()
query <- sidra_query(
1612,
variable = 214,
period = as.character(2018:2022),
geo = "Brazil",
classific = "c81",
category = list(2702)
)
batches <- sidra_split(query, by = "period", size = 2)
length(batches$queries)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.