View source: R/get_templates.R
pop_up | R Documentation |
Create a drop-down vignette for nodes from different items (for galleries).
pop_up(data, title="name", title2=NULL, info=TRUE, entity="entity",
links=c("wikidata", "wiki"), wikilangs="en")
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. |
a character vector of html formatted vignettes attached to 'data' in a column named 'pop_up'.
Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.