Learn R Programming

wikiTools (version 1.2.8)

w_query: Response from Wikidata Query Service

Description

Retrieve responses from Wikidata Query Service (WDQS). Uses ratelimitr if param limitRequester = TRUE.

Usage

w_query(sparql_query, format = "csv", method = "GET", limitRequester = FALSE)

Value

The response in selected format or NULL on errors.

Arguments

sparql_query

A string with the query in SPARQL language.

format

A string with the query response format. Mandatory. See https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual#SPARQL_endpoint. Only 'json', 'xml' or 'csv' formats are allowed, default 'csv'.

method

The method used in the httr request, GET or POST, mandatory. Default 'GET'.

limitRequester

If True, uses ratelimitr to limit the requests.

Author

Angel Zazo, Department of Computer Science and Automatics, University of Salamanca