download_patentsview_bulk.RdDownload one of the bulk tables from PatentsView, and optionally make an Arrow dataset from it.
download_patentsview_bulk(table, dir = tempdir(), pregrant = FALSE,
partition = NULL, make_db = FALSE, format = "parquet",
return_table = TRUE, ..., overwrite = FALSE)Name of the table to download, as listed on the Data Downloads page.
Directory in which to save original tables and the dataset if make_db is TRUE.
Logical; if TRUE, will download the pre-grant version of table.
A vector of column names to be used as partition keys, if make_db is TRUE.
Can be a named list of functions, which will be used to create new columns, then partition by those columns
(e.g., list(series_code = function(d) substr(d$patent_id, 1, 2))). If NULL not specified, will choose
a column with the number of unique values closest to 20.
Logical; if TRUE, will make an Arrow dataset out of the downloaded table.
Format of the dataset, if make_db is TRUE.
Logical; if FALSE, returns the path to the file, rather than the read-in table.
Passes additional arguments to vroom when reading in tables.
Logical; if TRUE, overwrites any existing files (raw and prepared).
The original table (if return_table is TRUE; as a tibble), an opened dataset
(if the path to the dataset exists), or the path to the downloaded file.
if (FALSE) {
# download the application table of granted patents
download_patentsview_bulk(".", "application", partition = "series_code")
}