README.md

ambientweatheR

ambientweatheR provides programmatic access to an Ambient Weather user's weather station data via REST API.

Ambient Weather API documentation available HERE.

Main functions:

Installation

devtools::install_github("andrewflack/ambientweatheR")

Example

library(ambientweatheR)
library(tidyverse)
mac_address <- list_user_devices() %>% flatten() %>% pluck("macAddress")
df <- seq.Date(as.Date("2019-08-01"), as.Date("2019-08-04"), "day") %>% 
  map(as.character) %>% 
  map_df(~ fetch_device_data(mac_address, .x)$content)
df %>% 
  select(date_time, tempf, feelsLike, dewPoint) %>% 
  gather(key = "key", value = "value", -date_time) %>% 
  ggplot(aes(x = date_time, y = value, colour = key)) + 
  geom_point()



andrewflack/ambientweatheR documentation built on Nov. 2, 2019, 1:52 p.m.