pd_changes: What changed between versions

View source: R/changes.R

pd_changesR Documentation

What changed between versions

Description

Each time a publisher releases again, the site compares the new version with the one before it, row by row on the dataset's key. 'pd_changes()' lists those comparisons; 'pd_diff()' reads one of them in full.

Usage

pd_changes(slug, from = NULL, to = NULL)

pd_diff(slug, version = NULL)

Arguments

slug

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

from, to

Version dates bounding the comparisons listed. Every comparison kept when both are 'NULL'.

version

The newer version of the pair: the comparison with the version before it. The newest when 'NULL'.

Value

'pd_changes()' returns a tibble with one row per comparison, oldest first: the two versions, their rows, how many rows were added, removed, changed and unchanged, the fields added and removed, and the comparison's URL. A database is compared by each table's row count, so its added, removed and changed are 'NA' and its tables added and removed are listed as fields.

'pd_diff()' returns the comparison as a list of class 'pd_diff': the counts above, the keys of the rows added, removed and changed (up to 50,000 of each, with 'truncated' saying when there were more) and up to ten changed rows with each changed field's old and new value.

See Also

Other metadata: pd_attribution(), pd_cite(), pd_fields(), pd_latest(), pd_provenance(), pd_schema(), pd_tables()

Examples


pd_changes("rba-money-market-daily")


steps <- pd_changes("rba-money-market-daily")
if (nrow(steps)) pd_diff("rba-money-market-daily", steps$to[nrow(steps)])


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