This package requires a valid API auth token to work.
Configuration can be provided in 3 forms:

Config files are the most convenient configuration method. Once saved configuration will be automatically restored when is loaded.

From the R console:

saved_cfg <-"YOUR API TOKEN")

To obtain your API token, visit: For additional configuration options, see ?set_config


For your security, do not include your API authentication token in code that is intended to be shared with others.

Pulling data

Use the package to retrieve data from the site using SQL or SPARQL.

Here is an example:

intro_ds <- ""
team_df <-"SELECT * FROM DataDotWorldBBallTeam"),
  dataset = intro_ds


For additional examples, including parameterized queries and SPARQL, see query vignette.

Publishing Insights

For your convenience, this package allows you to publish insights to data projects without leaving R Studio.

Using R Studio’s “Addins” menu, look for DATA.WORLD > New insight.

Add-in Menu

Add-in Menu

The add-in will automatically capture the active plot in R Studio’s plot view and give you the opportunity to quickly choose the project, and enter title and description for your insight.

Add-in Window

Add-in Window REST API

The dwapi package simplifies access to REST APIs. dwapi is bundled and automatically loaded with Using it you can create and update datasets, upload data and update metadata, among other things.

For example, to get the definitions of a dataset, you can:

intro_def <- dwapi::get_dataset(intro_ds)

To learn more about’s REST API, checkout and ?dwapi.