aqiPalette: Color Palettes for Air Quality Monitoring Data

Description Usage Arguments Value See Also Examples

View source: R/aqiPalette.R

Description

Creates a *leaflet* color palette function that can be used to convert monitoring data into vectors of colors.

Usage

1
aqiPalette(style = "aqi", reverse = FALSE)

Arguments

style

Palette style, one of 'aqi'.

reverse

Logicial specifying whether the colors (or color function) in palette should be used in reverse order.

Value

A function that takes a single parameter x; when called with a vector of numbers, #RRGGBB color strings are returned.

See Also

'leaflet::colorBin()'

Examples

1
2
3
pm25 <- PWFSLSmoke::Carmel_Valley$data[,2]
binned_colors <- aqiPalette("aqi")(pm25)
plot(pm25, col=binned_colors, pch=15, main='Binned Colors')

Example output

Loading required package: dplyr

Attaching package:dplyrThe following objects are masked frompackage:stats:

    filter, lag

The following objects are masked frompackage:base:

    intersect, setdiff, setequal, union

Loading required package: maps
Loading required package: MazamaCoreUtils
Loading required package: MazamaSpatialUtils
Loading required package: sp

PWFSLSmoke documentation built on July 8, 2020, 7:19 p.m.