| pd_download | R Documentation |
Download one version's file
pd_download(
slug,
format = "parquet",
version = NULL,
path = NULL,
table = NULL,
cache = NULL
)
slug |
The dataset's slug, as in its page URL 'https://publicdata.au/d/<slug>/'. |
format |
One of '"parquet"', '"csv"', '"csv.gz"', '"json"', '"ndjson"', '"sqlite"', '"duckdb"', '"xlsx"', '"arrow"', '"geojson"', '"gpkg"' or '"geo.parquet"'. The last three are served only for datasets with a location or a shape. |
version |
A version date from [pd_versions()]. The newest when 'NULL'. |
path |
Where to save the file. When ‘NULL', a file in the session’s temporary directory named for the slug and version, or the file in the cache when 'cache' is on. |
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. |
The path of the saved file, invisibly, with the version it resolved to in 'attr(path, "version")'.
Other files:
cache,
pd_read(),
pd_url()
f <- pd_download("qld-road-crash-factors", "csv")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.