getWikiInf: Create a data.frame with Q's and descriptions of a vector of...

View source: R/wikiTools.R

getWikiInfR Documentation

Create a data.frame with Q's and descriptions of a vector of names.

Description

Create a data.frame with Q's and descriptions of a vector of names.

Usage

getWikiInf(names, number = 1, language = "en")

Arguments

names

A vector consisting of one or more Wikidata's entry (i.e., topic or person).

number

Take the number occurrence in case there are several equal names in Wikidata.

language

The language of the Wikipedia page version. This should consist of an ISO language code (default = "en").

Value

A data frame with name, Q, label and description of the names.

Author(s)

Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/

Examples

## Obtaining information in English Wikidata
names <- c("William Shakespeare", "Pablo Picasso")
information <- getWikiInf(names)

## Obtaining information in Spanish Wikidata
## Not run: 
informacion <- getWikiInf(names, language="es")

## End(Not run)

wikiTools documentation built on March 24, 2022, 9:05 a.m.