Low-level helper for arbitrary CKAN resources. Resolves the
package by id (slug) and picks the first resource matching
pattern, or the first resource if pattern is NULL.
Usage
ato_download(
id,
pattern = NULL,
parse = c("auto", "csv", "xlsx", "none"),
sheet = 1
)See also
Other discovery:
ato_catalog(),
ato_charities(),
ato_cite(),
ato_excise(),
ato_fbt(),
ato_help(),
ato_irpd(),
ato_payg(),
ato_rdti(),
ato_sme_benchmarks(),
ato_tax_gaps(),
ato_top_taxpayers(),
ato_vttc()
Examples
# \donttest{
op <- options(ato.cache_dir = tempdir())
try({
cat <- ato_download("corporate-transparency",
pattern = "2023",
parse = "csv")
})
#> ℹ Downloading <https://data.gov.au/data/dataset/c2524c87-cea4-4636-acac-599a820…
#> ✔ Downloading <https://data.gov.au/data/dataset/c2524c87-cea4-4636-acac-599a820…
#>
#> Warning: line 1 appears to contain embedded nulls
#> Warning: line 2 appears to contain embedded nulls
#> Warning: line 3 appears to contain embedded nulls
#> Warning: line 4 appears to contain embedded nulls
#> Warning: line 5 appears to contain embedded nulls
#> Error in read.table(file = file, header = header, sep = sep, quote = quote, :
#> more columns than column names
options(op)
# }