Automatically discovers valid report IDs by testing a range of IDs against the SITUAS API. This function can be used to find new reports that may have been added to the API.

scan_situas_reports(max_id = 200, date = Sys.Date(), verbose = TRUE)

Arguments

max_id

Integer. Maximum report ID to test. Defaults to 200.

date

Date, POSIXct, or character string. The reference date for testing reports. Defaults to current date.

verbose

Logical. If TRUE, print progress messages during scanning. Defaults to TRUE.

Value

A data.table with columns:

pfun

Report ID (integer)

type

Report type: "DATA" or "PERIODO" (character)

row_count

Number of rows at the given date (integer)

Examples

if (FALSE) { # \dontrun{
# Scan for all valid reports up to ID 150
valid_reports <- scan_situas_reports(max_id = 150)
print(valid_reports)

# Scan without progress messages
valid_reports <- scan_situas_reports(max_id = 100, verbose = FALSE)
} # }