| pd_changes | R Documentation |
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.
pd_changes(slug, from = NULL, to = NULL)
pd_diff(slug, version = NULL)
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'. |
'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.
Other metadata:
pd_attribution(),
pd_cite(),
pd_fields(),
pd_latest(),
pd_provenance(),
pd_schema(),
pd_tables()
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)])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.