Downloads again the exact table addressed by a table URI, stored as an id
attribute on the tables returned by dg_pull_dataset() and readable with
dg_table_id(). The URI is built from the platform's own stable identifiers
(dataset id + resource id, plus the file name inside a ZIP) and opens the
dataset page in a browser, so this reproducibly returns the same table,
independent of the human-readable list keys.
Arguments
- x
Either a table returned by
dg_pull_dataset()ordg_refetch()(itsidattribute is read automatically) or a table address string: the URIhttps://www.data.gouv.fr/datasets/<dataset_id>#<resource_id>(or...#<resource_id>/<file>for a file inside a ZIP).- remove_na
Whether to drop rows containing any
NAvalue (passed toformat_tibble()). Defaults toFALSE.- col_types
Optional named vector of column types to force on specific columns instead of letting vroom infer them, e.g.
c(date_mise_en_service = "Date"). Seedg_pull_dataset()for the accepted shorthand values. Defaults toNULL(no column overrides).- use_tabular_types
Whether to seed column types from data.gouv's tabular API profile, as in
dg_pull_dataset()(column typescol_typesdoes not pin are taken from the profile when it is available). Defaults toTRUE. Applies to single-file resources only — the profile of the addressed resource is used; a missing or inapplicable profile (including any ZIP member) falls back to type inference.
Value
A tibble::tibble() — the single re-fetched table (the id addresses
one table, not a multi-file ZIP as a whole). The table's id is attached as
an id attribute; parsing issues are attached as an rdatagouv_problems
attribute, readable with dg_problems().
Examples
if (FALSE) { # interactive()
tbl <- dg_pull_dataset("6397c0ff56d3963118a18345")
again <- dg_refetch(tbl)
}