sidra_plan: Estimate the size of a SIDRA query

View source: R/plan.R

sidra_planR Documentation

Estimate the size of a SIDRA query

Description

Creates an offline plan from a sidra_query() object or official SIDRA values URL. Exact cardinalities are calculated only when they follow from explicit selections in the URL. Special selections such as all, allxp, first, and last, territorial views and containment filters remain unknown until metadata is available.

Usage

sidra_plan(query, limit = NULL)

Arguments

query

A sidra_query object or an official SIDRA values URL.

limit

Optional positive numeric limit used only to classify risk. No SIDRA limit is assumed by the package.

Value

A list of class sidra_plan containing table, url, a stable dimensions data frame, total_estimated, limit, exceeds_limit, and risk. The originating query is retained internally for use by sidra_collect(). total_estimated is NA whenever any cardinality is unknown.

See Also

sidra_query()

Examples

query <- sidra_query(
  1612,
  variable = c(214, 215),
  period = c("2020", "2021"),
  geo = "n1",
  classific = "c81",
  category = list(c(2702, 2703))
)
sidra_plan(query, limit = 20)

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