refine_export: Export data from OpenRefine

View source: R/refine_export.R

refine_exportR Documentation

Export data from OpenRefine

Description

This function allows users to pull data from a running OpenRefine instance into R. Users can specify project by name or unique identifier. The function wraps the OpenRefine API query to /command/core/export-rows and currently only supports export of data in tabular format.

Usage

refine_export(
  project.name = NULL,
  project.id = NULL,
  format = "csv",
  col.names = TRUE,
  encoding = "UTF-8",
  col_types = NULL,
  ...
)

Arguments

project.name

Name of project to be exported

project.id

Unique identifier for project to be exported

format

File format of project to be exported; note that the only current supported options are 'csv' or 'tsv'

col.names

Logical indicator for whether column names should be included; default is TRUE

encoding

Character encoding for exported data; default is UTF-8

col_types

One of NULL, a cols() specification, or a string; default is NULL. Used by read_csv to specify column types.

...

Additional parameters to be inherited by refine_path; allows users to specify host and port arguments if the OpenRefine instance is running at a location other than http://127.0.0.1:3333

Value

A tibble that has been parsed and read into memory using read_csv. If col.names=TRUE then the tibble will have column headers.

References

https://docs.openrefine.org/technical-reference/openrefine-api#export-rows

Examples

## Not run: 
fp <- system.file("extdata", "lateformeeting.csv", package = "rrefine")
refine_upload(fp, project.name = "lfm")
refine_export("lfm", format = "csv")

## End(Not run)


vpnagraj/rrefine documentation built on Nov. 21, 2022, 12:20 a.m.