sparql: Execute SPARQL query against a dataset.

Description Usage Arguments Value Examples

View source: R/sparql.R

Description

#' EXPERIMENTAL: This is an experimental feature and backwards-compability is not guaranteed in future releases.

Usage

1
sparql(owner_id, dataset_id, query, query_params = list())

Arguments

owner_id

User name and unique identifier of the creator of a dataset or project

dataset_id

Dataset unique identifier

query

SPARQL query.

query_params

List of named query parameters.

Value

Data frame with data from query results.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
 dwapi::sparql("user", "dataset",
   query="SELECT *
          WHERE {
            ?s ?p ?o .
          } LIMIT 10")

dwapi::sparql(dataset="user/dataset",
  query="SELECT *
         WHERE {
         [ :Year ?year ; :Region ?region ; :Indicator_Coverage_and_Disaggregation ?score ]
         FILTER(?score > $v1)
         } LIMIT 10",
  queryParameters = list("$v1"=5.5))

## End(Not run)

datadotworld/dwapi-r documentation built on July 3, 2021, 3:40 a.m.