Skip to main content

R and R Studio

The R package makes it easy to query datasets and use's REST API.

Install and configure the R package.

Using an R console (like R Studio), you can use the R package to run queries, import datasets, upload data, and more.

Install the package for R:

devtools::install_github("datadotworld/", build_vignettes = TRUE)


Note: You will need to have the devtools package for R installed to run the previous command. If that is not already installed, you can install it from CRAN using the command install.packages("devtools")


Configure the package with your API token.

saved_cfg <-"YOUR API TOKEN")


View the Quickstart vignette to view more information on the package.

library("quickstart", package = "")


Import your first query.

Using the package, import your first query:

  1. Choose your dataset and retrieve your SQL or SPARQL query.


    The below query includes specific query parameters. You can also simplify your query by using SELECT * FROM DataDotWorldBBallTeam

  2. intro_ds <- ""
    sample_query <-
    "SELECT t.Name, t.Height, s.AssistsPerGame ",
    "FROM DataDotWorldBBallTeam as t ",
    "JOIN DataDotWorldBBallStats as s ON t.Name = s.Name ",
    "ORDER BY s.AssistsPerGame DESC")), dataset = intro_ds)
  3. Use the available functions to begin modeling your data.

What next?

Here are some things you can do with R and

  • Use the Addins menu to quickly add a new Insight to from R Studio.

  • Use the included dwapi package to update datasets, upload files, list all tables in a project, and more.