list_available_reports.RdReturns a data.table containing information about all available SITUAS reports, including report IDs, names, descriptions, types, and row counts. This function can work with a built-in list of known SITUAS reports or explore custom report IDs. When exploring custom IDs, it can automatically detect whether each report uses DATA (single date) or PERIODO (date range) format.
list_available_reports(
date = Sys.Date(),
verbose = FALSE,
report_ids = NULL,
auto_detect_type = TRUE
)Date, POSIXct, or character string. The reference date for checking report availability and row counts. Defaults to current date.
Logical. If TRUE, print progress messages while fetching report information. Defaults to FALSE.
Vector of integer report IDs to explore. If NULL (default), uses built-in list of known SITUAS reports. Provide custom IDs to explore specific reports or discover new ones.
Logical. If TRUE (default), automatically detects whether each report ID uses DATA (single date) or PERIODO (date range) format by trying both. If FALSE, uses known types or defaults to DATA format for unknown IDs. Only relevant when report_ids is provided.
A data.table with columns:
Report ID (integer)
Full report title in Italian (character)
Report type: "DATA", "PERIODO", or "ATTUALIZZAZIONE" (character)
Validity period of the report (character)
Number of rows at the given date (integer)
if (FALSE) { # \dontrun{
# Get list of all available reports (using built-in list)
reports <- list_available_reports()
print(reports)
# Show only DATA type reports
data_reports <- reports[type == "DATA"]
# Find municipality-related reports
munic_reports <- reports[grepl("omun", title, ignore.case = TRUE)]
# Explore specific custom report IDs with auto-detection
custom_reports <- list_available_reports(report_ids = c(80, 85, 90))
# Explore custom IDs without auto-detection (faster but less flexible)
known_reports <- list_available_reports(report_ids = c(61, 63), auto_detect_type = FALSE)
# Discover potentially new report IDs with verbose output
new_reports <- list_available_reports(report_ids = 150:160, verbose = TRUE)
} # }