getWikiData: Create a data.frame with Wikidata of a vector of names.

View source: R/wikiTools.R

getWikiDataR Documentation

Create a data.frame with Wikidata of a vector of names.

Description

Create a data.frame with Wikidata of a vector of names.

Usage

getWikiData(names, language = "en", csv = NULL)

Arguments

names

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

language

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

csv

A file name to save the results, in which case the only return is a message with the name of the saved file.

Value

A data frame with personal information of the names or a csv file with the information separated by semicolons.

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
## Not run: 
names <- c("William Shakespeare", "Pablo Picasso")
info <- getWikiData(names)
## Obtaining information in Spanish Wikidata
d <- getWikiData(names, language="es")

## End(Not run)

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