% Generated by roxygen2: do not edit by hand % Please edit documentation in R/box.R \name{osem_boxes} \alias{osem_boxes} \title{Get a set of senseBoxes from the openSenseMap} \usage{ osem_boxes(exposure = NA, model = NA, grouptag = NA, date = NA, from = NA, to = NA, phenomenon = NA, endpoint = "https://api.opensensemap.org") } \arguments{ \item{exposure}{Only return boxes with the given exposure ('indoor', 'outdoor', 'mobile')} \item{model}{Only return boxes with the given model} \item{grouptag}{Only return boxes with the given grouptag} \item{date}{Only return boxes that were measuring within ±4 hours of the given time} \item{from}{Only return boxes that were measuring later than this time} \item{to}{Only return boxes that were measuring earlier than this time} \item{phenomenon}{Only return boxes that measured the given phenomenon in the time interval as specified through \code{date} or \code{from / to}} \item{endpoint}{The URL of the openSenseMap API instance} } \value{ A \code{sensebox data.frame} containing a box in each row } \description{ Boxes can be selected by a set of filters. Note that some filters do not work together: \enumerate{ \item \code{phenomenon} can only be applied together with \code{date} or \code{from / to} \item \code{date} and \code{from / to} cannot be specified together } } \examples{ # get *all* boxes available on the API b = osem_boxes() # get all boxes with grouptag 'ifgi' that are placed outdoors b = osem_boxes(grouptag = 'ifgi', exposure = 'outdoor') # get all boxes that have measured PM2.5 in the last 4 hours b = osem_boxes(date = Sys.time(), phenomenon = 'PM2.5') } \seealso{ \href{https://docs.opensensemap.org/#api-Measurements-findAllBoxes}{openSenseMap API documentation (web)} \code{\link{osem_phenomena}} \code{\link{osem_box}} }