w_EntityInfo {wikiTools}R Documentation

Get some personal properties of one Wikidata entity

Description

Gets some properties of the Wikidata "entity" related to birth and death dates, places, occupations, works, education, awards, identifier in some libraries, Wikipedia page titles (which can be limited to the languages in the "wikilangs" parameter), etc.

Usage

w_EntityInfo(
  entity,
  langsorder = "en",
  wikilangs = "",
  format = "reduced",
  mode = c("default", "tiny", "film")
)

Arguments

entity

The Wikidata entity to search for properties. Only one entity is allowed.

langsorder

Order of languages in which the information will be returned, separated with '|'. If no information exists in the first language, next is used. This parameter is mandatory, at least one language is required, default, 'en'. Note: sometimes not label in any language of langsorder is assigned to an entity, so an additional search is used to obtain almost one label for it (?entitylab) with LIMIT 1.

wikilangs

List of languages to limit the search of Wikipedia pages,fi using "|" as separator. Wikipedias pages are returned in same order as languages in this parameter. If wikilangs=” the function returns Wikipedia pages in any language, not sorted.

format

Wikipedia address format. By default is reduced, Otherwise, format is regular.

mode

The mode to obtain results: 'tiny' less properties are requested and less checks are done; 'film' gets some properties of the Wikidata "entity" related to information about film ('default' by default).

Value

A data-frame with the properties of the entity.

Author(s)

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

Examples

df1 <- w_EntityInfo(entity='Q134644', langsorder = 'es|en')
df2 <- w_EntityInfo(entity='Q134644', langsorder = 'es|en', mode = 'tiny')
## Not run: 
films <- w_EntityInfo(entity=c('Q180098','Q151895'), langsorder='es|en',
wikilangs='es|fr|en', mode='film')

## End(Not run)

[Package wikiTools version 1.2.4 Index]