sidra_collect: Collect one or more planned SIDRA queries

View source: R/collect.R

sidra_collectR Documentation

Collect one or more planned SIDRA queries

Description

Executes queries sequentially, checks that every batch has the same column names and types, and combines the rows without sorting or deduplicating them. Parallel requests are intentionally not used.

Usage

sidra_collect(x, value_type = NULL, provenance = FALSE)

Arguments

x

A sidra_query(), sidra_plan(), sidra_split() result, or a non-empty list of sidra_query objects.

value_type

Optional value representation overriding the preference stored in each query: "numeric", "character", or "both".

provenance

Logical. Attach URLs, access time, package version, and batch count as a sidrar_provenance attribute. URLs record the endpoint that supplied each batch; requested_urls is also included when a Cloudflare challenge required the official aggregate API fallback.

Value

A base data.frame(). When provenance = TRUE, its sidrar_provenance attribute can be read with sidra_provenance().

See Also

sidra_query(), sidra_split(), sidra_provenance()

Examples

## Not run: 
query <- sidra_query(
  7060,
  variable = 63,
  period = as.character(202401:202406),
  geo = "Brazil",
  classific = "c315",
  category = list(7169)
)
sidra_collect(sidra_split(query, "period", size = 3))

## End(Not run)

sidrar documentation built on Sept. 18, 2026, 9:14 a.m.