pop_up: Create a drop-down vignette for nodes from different items...

View source: R/get_templates.R

pop_upR Documentation

Create a drop-down vignette for nodes from different items (for galleries).

Description

Create a drop-down vignette for nodes from different items (for galleries).

Usage

pop_up(data, title="name", title2=NULL, info=TRUE, entity="entity",
    links=c("wikidata", "wiki"), wikilangs="en")

Arguments

data

Data frame which contains the data.

title

Column name which contains the first title of the vignette.

title2

Column name which contains the secondary title of the vignette.

info

Extract the first paragraph of a Wikipedia article.

entity

Column name which contains a vector of Wikidata entities.

links

Column names which contains the URLs for the vignette. 'wikidata' and 'wiki' by default, if this columns are missing, they will be generated through 'entity' argument.

wikilangs

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

Value

a character vector of html formatted vignettes attached to 'data' in a column named 'pop_up'.

Author(s)

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

Examples

## Not run: 
data("sociologists")
sociologists$entity <- sub(".png","",sociologists$picture)
sociologists <- pop_up(sociologists, title="name",
  title2="birth_country", entity="entity")
plot(exhibit(sociologists, label="name", ntext="pop_up"))

## End(Not run)

Modesto-Escobar/netCoin-2.x documentation built on April 14, 2025, 5:41 a.m.