sparql: Tools to create a custom SPARQL query

Description Usage Arguments Value Examples

View source: R/query.R

Description

Function to create custom queries with the '/landregistry/query endpoint'. All necessary prefixes have to be included and output will be parsed from json to dataframe. The most prefixes from land registry can be include with prefix_query.

Usage

1
2
3
4
5
6
7
sparql(
  query,
  endpoint = "http://landregistry.data.gov.uk/landregistry/query",
  ...
)

prefix_query(query)

Arguments

query

custom query.

endpoint

land registry's web service endpoint.

...

further arguments passed to httr::GET.

Value

Returns a tibble that has been parsed from json.

Examples

1
2
3
4
custom_query <- "select * where {
  <http://landregistry.data.gov.uk/data/ukhpi/region/newport/month/2013-10> ?property ?value
}"
sparql(prefix_query(custom_query))

uklr documentation built on May 25, 2021, 1:06 a.m.