Tools for Wikidata and Wikipedia


[Up] [Top]

Documentation for package ‘wikiTools’ version 0.0.6

Help Pages

cc Converts a text separated by commas into a character vector.
extractWiki Extract the first paragraph of a Wikipedia article with a maximum of characters.
filext Extract the extension of a file
getFiles Downloads a list of files in a specified path of the computer, and return a vector of the no-found names (if any).
getWikiData Create a data.frame with Wikidata of a vector of names.
GetWikidataitem GetWikidataitem Use Wikimedia_query to obtain the Wikidata entity of a article from a Wikimedia project. Automatically resolvs redirects.
getWikiFiles Downloads a list of Wikipedia pages in a specified path of the computer, and return a vector of the no-found names (if any).
getWikiInf Create a data.frame with Q's and descriptions of a vector of names.
get_template Create a drop-down vignette for nodes from different items (for galleries).
get_template_for_maps Create a drop-down vignette for nodes from different items (for maps).
limit_requester limit_requester Limit the rate at which a function will execute
nametoWikiFrame Convert names into a Wikipedia's iframe
nametoWikiHtml Create the Wikipedia link of a name or entry.
nametoWikiURL Create the Wikipedia URL of a name or entry.
preName Reverse the order of the first and last names of every element of a vector.
req_WDQS req_WDQS Retrieve responses in JSON format from Wikidata Query Service (WDQS)
req_wikimedia_metrics req_wikimedia_metrics Retrieve responses in JSON format from Wikimedia metrics API
searchWiki Find if there is a Wikipedia page of a name(s) in the selected language.
urltoFrame Convert an URL link to an HTML iframe.
urltoHtml Convert a Wikipedia URL to an HTML link
validUrl Find if an URL link is valid.
Wikidata_occupationCount Wikidata_occupationCount Search Wikidata Query Service (WDQS) to know the number of Wikidata entities with P106 property (occupation) set to Qoc.
Wikidata_sparql_query Wikidata_sparql_query Retrieve responses in JSON format from Wikidata Query Service (WDQS) #' req_WDQS_rated The ratelimitr version of req_WDQS_rate. See https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual#SPARQL_endpoint
Wikidata_Wikipedias Wikidata_wikipedias For an occupation, obtains all Wikidata entity of the people with that ocupation, also the number of wikipedias witch article they have, and the URL of those wikipedias (sep = tab) Run queries splitting with offset and chunk.
Wikimedia_get_redirects Wikimedia_get_redirects Obtains redirection pages (from namespace 0) to the article page in the Wikimedia project
Wikimedia_page_views Wikimedia_page_views Return the number of views one article has in a Wikimedia project in a date interval (see granularity). Optionally include redirections to the article page. req_wikimeida_metrics_rated The limitratedr version of req_wikimedia_metrics.
Wikimedia_person_exists Wikimedia_person_exists Use Wikimedia_query and Wikidata_sparql_query to check if a article of a person exists in the Wikimedia project. If exists, also return the Wikipedia pages of that person in the languages indicated in param lang
Wikimedia_query Wikimedia_query Use httr package to retrieve responses in JSON format about an article from Wikimedia API.
wmflabs_get_allinfo wmflabs_get_allinfo Obtains information about an article in the Wikimedia project in JSON format, or NULL on error.