Returns detailed metadata about a SITUAS report, including column descriptions, data sources, and field information.

situas_get_report_metadata(pfun, date = Sys.Date(), date_end = NULL)

Arguments

pfun

Integer. Report ID (function number). See list_available_reports for a list of valid report IDs.

date

Date, POSIXct, or character string. The reference date for the report. For DATA type reports, this is the single date parameter. For PERIODO type reports, this is the start date. Defaults to current date.

date_end

Date, POSIXct, or character string. End date for PERIODO type reports. Leave NULL for DATA type reports. Defaults to NULL.

Value

A list containing report metadata including:

REPORT_NAME

Report title

REPORT_DESCRIZIONE

Report description

COL_DETAILS

List of column metadata

Examples

if (FALSE) { # \dontrun{
# Get metadata for municipalities report
metadata <- situas_get_report_metadata(pfun = 61)
cat("Report:", metadata$`REPORT NAME`, "\n")
cat("Description:", metadata$`REPORT DESCRIZIONE`, "\n")

# List all columns
if (!is.null(metadata$COL_DETAILS)) {
  for (col in metadata$COL_DETAILS) {
    cat(col$COLNAME, ":", col$LABEL, "\n")
  }
}
} # }