sidra_locations: List the locations available for a SIDRA table

View source: R/discovery.R

sidra_locationsR Documentation

List the locations available for a SIDRA table

Description

List the locations available for a SIDRA table

Usage

sidra_locations(
  table,
  level,
  refresh = FALSE,
  cache = FALSE,
  ttl = 1800,
  cache_dir = NULL
)

Arguments

table

A single SIDRA table code.

level

A single geographic level, with or without the "N" prefix; for example, "N6" or 6 for municipalities.

refresh

A single logical value. When caching is enabled, bypass and replace an existing entry.

cache

A single logical value. Cache normalized catalog or metadata responses on disk. The default is FALSE, preserving live behavior.

ttl

A positive cache lifetime in seconds. The default is 30 minutes.

cache_dir

Optional cache directory. By default, the platform-specific user cache directory for sidrar is used.

Details

Locations come from the official table- and level-specific version 3 endpoint. Location identifiers are SIDRA territorial identifiers; they must not be coerced to numeric values or assumed to be census tract codes.

Value

A base data.frame() with columns table_id, level_id, level_name, location_id, and location_name. All identifiers are character vectors.

Author(s)

Renato Prado Siqueira rpradosiqueira@gmail.com

See Also

sidra_metadata()

Other SIDRA discovery functions: sidra_catalog(), sidra_metadata(), sidra_periods()

Examples

## Not run: 
sidra_locations(7060, "N6")

## End(Not run)

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