pd_read: Read a whole table

View source: R/publicdataau.R

pd_readR Documentation

Read a whole table

Description

Downloads one version's Parquet file, or one table of a database, and reads it with 'arrow'.

Usage

pd_read(slug, version = NULL, table = NULL, cache = NULL, columns = NULL)

Arguments

slug

The dataset's slug, as in its page URL 'https://publicdata.au/d/<slug>/'.

version

A version date from [pd_versions()]. The newest when 'NULL'.

table

For a database, one of its tables, which is served as Parquet. See [pd_tables()].

cache

Keep the file in [pd_cache_dir()] and reuse it next time. Versions never change, so a kept file never goes stale. Off unless 'options(publicdataau.cache = TRUE)' is set.

columns

Fields to read, which saves memory on a wide table. Every field when 'NULL'.

Value

A tibble, each column labelled with its field's description. 'attr(x, "publicdata")' is the provenance header the file itself carries: version, licence, attribution, citation and source.

See Also

Other files: cache, pd_download(), pd_url()

Examples


crashes <- pd_read("qld-road-crash-factors")


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