The data.world R package makes it easy to query datasets and use data.world's REST API.
Using an R console (like R Studio), you can use the data.world R package to run queries, import datasets, upload data, and more
devtools::install_github("datadotworld/data.world-r", build_vignettes = TRUE)
saved_cfg <- data.world::save_config("YOUR API TOKEN")
data.world::set_config(saved_cfg)
library(data.world)
vignette("quickstart", package = "data.world")
Using the data.world package, import your first query:
SELECT * FROM DataDotWorldBBallTeam
intro_ds <- "https://data.world/jonloyens/an-intro-to-dataworld-dataset" sample_query <- data.world::qry_sql(paste0( "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")) data.world::query(sample_query, dataset = intro_ds)
Here are some things you can do with R and data.world:
dwapi
package to update datasets, upload files, list all tables in a project, and more.