glottospotlight: Highlight certain data points in visualizations

View source: R/glottocolors.R

glottospotlightR Documentation

Highlight certain data points in visualizations

Description

This function creates two separate color scales: one for points to highlight, and a second for the remaining background points. It also creates a legend. This is useful for preparing the data for visualizations such as maps or other plots.

Usage

glottospotlight(glottodata, spotcol, spotlight, spotcontrast = NULL)

Arguments

glottodata

User-provided glottodata

spotcol

Name of the column that contains the data to put in the spotlights (as well as remaining background data).

spotlight

Selection of data to put in the spotlights.

spotcontrast

Optional column to contrast between data points in the spotlight.

Value

A glottodata object with columns added to be used in visualization.

Examples


glottodata <- glottofilter(country = c("Netherlands", "Germany", "Belgium") )
glottodata <- glottospotlight(glottodata = glottodata, spotcol = "country",
                              spotlight = "Netherlands")
glottomap(glottodata, color = "legend")


SietzeN/glottospace documentation built on June 15, 2024, 10:45 p.m.