| pd_read | R Documentation |
Downloads one version's Parquet file, or one table of a database, and reads it with 'arrow'.
pd_read(slug, version = NULL, table = NULL, cache = NULL, columns = NULL)
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'. |
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.
Other files:
cache,
pd_download(),
pd_url()
crashes <- pd_read("qld-road-crash-factors")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.