pd_url: A file's URL

View source: R/meta.R

pd_urlR Documentation

A file's URL

Description

The address of one version's file, for reading with another tool such as ‘read.csv()', ’arrow' or 'DuckDB', or for a 'targets' pipeline with 'format = "url"', which reruns when the address changes.

Usage

pd_url(slug, format = "parquet", version = NULL, table = NULL)

Arguments

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'.

table

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

Value

The URL as text. With a 'version' it names a file that never changes; without one it names the newest version's file, which redirects to a dated URL and moves when the publisher releases again.

See Also

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

Examples

pd_url("au-road-deaths", "csv", "2026-08-07")

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