Skip to contents

Workhorse function that automatically applies routine text formatting to common pollutant names which may be used in the HTML widgets produced by openairmaps.

Usage

quickTextHTML(text)

Arguments

text

A character vector.

Value

The function returns a character vector for HTML evaluation.

Details

quickTextHTML() is routine formatting lookup table. It screens the supplied character vector text and automatically applies formatting to any recognised character sub-series to properly render in HTML.

See also

The original openair::quickText(), useful for non-HTML/static maps and plots

Author

Jack Davison.

Examples

labs <- c("no2", "o3", "so2")
quickTextHTML(labs)
#> [1] "NO<sub>2</sub>" "O<sub>3</sub>"  "SO<sub>2</sub>"