situas_get_report_metadata.RdReturns 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)Integer. Report ID (function number). See list_available_reports
for a list of valid report IDs.
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, POSIXct, or character string. End date for PERIODO type reports. Leave NULL for DATA type reports. Defaults to NULL.
A list containing report metadata including:
Report title
Report description
List of column metadata
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")
}
}
} # }