Skip to contents

Returns the stable, unique address of a table downloaded with dg_pull_dataset() or dg_refetch(), which is stored as an id attribute on the table. The address is a URI of the form https://www.data.gouv.fr/datasets/<dataset_id>#<resource_id> (plus /&lt;file&gt; for a file inside a ZIP) and uniquely identifies a table on the platform, independent of the human-readable catalog titles. It can be passed directly to dg_refetch() or dg_schema() to re-fetch or document that exact table.

Usage

dg_table_id(x)

Arguments

x

A table returned by dg_pull_dataset() or dg_refetch().

Value

The composed table id, a string, or NULL if x carries no id attribute (e.g. an ordinary data frame).

Examples

tbl <- dg_table_id(iris)