Skip to contents

Plots the last reading of one sensor as a gauge, with the ideal range in green and a short note on what the gas and particle sensors measure.

Usage

plot_gauge(data, variable = "Temperature")

Arguments

data

data frame from get_data()

variable

one of "Temperature" "Humidity" "Pressure" "Lux" "Proximity" "NH3" "Reducing" "Oxidising" "PM1" "PM2.5" "PM10"

Value

A plotly object.

Examples

prometheus_url <- c(
  "http://pip1.crabdance.com:1507/api/v1/query_range",
  "http://pip1.crabdance.com:1505/api/v1/query_range"
)
filtered_df <- get_data(urlq = prometheus_url[1])
plot_gauge(data = filtered_df, variable = "Temperature")
plot_gauge(data = filtered_df, variable = "Humidity")
plot_gauge(data = filtered_df, variable = "PM2.5")