publicdataau-package: publicdataau: Australian Government Open Data from...

publicdataau-packageR Documentation

publicdataau: Australian Government Open Data from 'publicdata.au'

Description

Search, filter, total and download the Australian government open data republished at https://publicdata.au/, where every version of a dataset is kept at a URL that never changes. Rows and totals come from the site's query API as typed, labelled 'tibble' data frames, and whole tables from its files in any of twelve formats. Map layers come as 'sf' objects, and rows that carry the code of an area join to the Australian Bureau of Statistics boundaries in one call. The 'DuckDB' file of any version can be attached over the web and queried in place with 'DBI' or 'dplyr'. Downloads can be kept in a cache, since a version never changes, the changes between versions are listed row by row, and the source file, fetch time and checksum of every version are on record. Every answer carries the version it came from and the attribution the publisher's licence requires, and citations come as 'BibTeX'. Any dataset the site serves works by its slug, so a new dataset needs no new release.

Details

Every function takes a dataset's slug, the part of its page's URL after '/d/', so a dataset added to the site works with no new release. Start with [pd_datasets()] to find one, [pd_fields()] to see what it holds, then [pd_rows()], [pd_aggregate()], [pd_read()] or [pd_tbl()] to use it.

Options

'publicdataau.cache'

'TRUE' keeps every downloaded file in [pd_cache_dir()] for reuse. Off by default.

'publicdataau.cache_dir'

Where the cache is kept.

'publicdataau.quiet'

'TRUE' turns off the licence notice and the download progress bar.

'publicdataau.site'

Another copy of the site to read, such as a preview. The 'PUBLICDATA_SITE' environment variable does the same.

Errors

Every error the package raises has the class 'publicdataau_error'. One that comes from failing to reach the site also has 'publicdataau_unreachable', and asking [pd_sf()] for a dataset without a map layer has 'publicdataau_no_layer', so either can be caught with 'tryCatch()'. An error answer from the site keeps the classes 'httr2' gives it, such as 'httr2_http_404'.

Author(s)

Maintainer: Cameron Young cameron@nationaldigital.com.au

Authors:

Other contributors:

  • National Digital [copyright holder, funder]

See Also

Useful links:


publicdataau documentation built on Oct. 14, 2026, 5:07 p.m.