popup_caaqs | R Documentation |
For CAAQs where two metrics used to assess management status (e.g., PM 2.5, SO2, NO2)
popup_caaqs(
data,
type = "station",
metric_type,
metrics,
units,
airzone = "airzone",
n_years = "n_years",
station_name,
station_id,
value1,
value2,
level1,
level2 = NULL,
colour1 = "colour",
colour2 = "colour2",
text_colour1 = "text_colour",
text_colour2 = "text_colour2"
)
data |
Data Frame. CAAQ information |
type |
Character. Which type of popup? "station" or "airzone"? |
metric_type |
Character Display name of the CAAQ metric in HTML code (e.g., '"PM<sub>2.5</sub>"'). |
metrics |
Character vector. Metrics to combine (e.g., c("annual", "24hr")) |
units |
Character. Metric units in HTML code (e.g., "ppm" or "μg/m³") |
airzone |
Character. Column name of the airzone column. |
n_years |
Character. Column name of the number of years (e.g., 'n_years') |
station_name |
Character. Column name of the station name. |
station_id |
Character. Column name of the station id (can be the same as station name). |
value1 |
Character. Column name of the first metric value (e.g., 'metric_value_ambient_annual'). |
value2 |
Character. Column name of the second metric value (e.g., 'metric_value_ambient_24h'). |
level |
Character. Column name of the CAAQS level (e.g., 'caaqs_ambient'). |
colour |
Character. Column name of the colour for hte CAAQS status box (should correspond to each 'level') |
text_colour |
Character. Column name of the text colour for the CAAQS status box (should correspond to each 'level') |
Character vector of the HTML code for the popup to be passed to leaflet
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.