Skip to contents

Main functions

These are the core functions of the glitter package.

spq_add()
Add a triple pattern statement to a query
spq_init()
Initialize a query object.
spq_perform()
Assemble query parts into a sparql query and send it to endpoint to get a tibble as a result.

General handling of query

These functions must be used to build the query before it is sent to the SPARQL endpoint. They detail the query and might lighten it e.g. through e.g. spq_head() or spq_summarise(), which might prove useful or even necessary to agree with the server’s limits. On the other hand, their dplyr counterparts (filter(), select(), arrange(), mutate(), summarise()) apply to the table obtained as the result of the query.

spq() is.spq() as.spq()
SPARQL escaping.
spq_add()
Add a triple pattern statement to a query
spq_arrange()
Arrange results by variable value
spq_assemble()
Assemble query parts into a proper SPARQL query
spq_control_request()
Create the request control object for spq_init()
spq_endpoint_info()
Create the endpoint info object for spq_init()
spq_filter()
Filters results by adding conditions
spq_group_by()
Group the results by one or more variables
spq_head()
Return the first lines of results
spq_init()
Initialize a query object.
spq_label()
Label variables
spq_mutate()
Create and modify variables in the results
spq_offset()
Offset the first generated result
spq_perform()
Assemble query parts into a sparql query and send it to endpoint to get a tibble as a result.
spq_prefix()
Add prefixes to the query
spq_select()
Select (and create) particular variables
spq_set()
Set helper values for the query
spq_summarise() spq_summarize()
Summarise each group of results to fewer results
spq_tally() spq_count()
Count the observations
usual_endpoints
Usual endpoints: this dataset allows the user to refer to them using a simplified name rather than their full url.
usual_prefixes
Usual prefixes: this dataset allows the user to refer to usual prefixes in their queries without manually specifying the associated urls.

Syntax auxiliaries

These functions help translate R syntax into SPARQL language

set_functions term_functions misc_functions string_functions numeric_functions datetime_functions operators all_correspondences
Correspondence between R-DSL functions and SPARQL functions/operators.

Wikidata

wd_properties
Wikidata properties

Debugging

spq_assemble()
Assemble query parts into a proper SPARQL query