label_standardize: Create Leaflet Label

View source: R/label_standardize.R

label_standardizeR Documentation

Create Leaflet Label

Description

Creates a label-vector for Leaflet map from a supplied dataframe and character string supplied to a glue function

Usage

label_standardize(df, label_text)

Arguments

df

A spatial dataframe that will be supplied to a leaflet() function

label_text

A data-masked text string fed to a glue function and later read as HTML, so HTML elements should be incorporated (e.g., <p></p>)

Value

A character vector of labels that will be supplied in a leaflet map

Examples

label_standardize(leafletwrappers::wards, "Ward name: {WARD}<p></p> Area: {Area}")

dpowerstp/leafletwrappers documentation built on Sept. 4, 2022, 10:19 a.m.