Commit a9b133a5 authored by Jean-Marie Lepioufle's avatar Jean-Marie Lepioufle
Browse files

add meta function

parent 2916ee5a
......@@ -2,3 +2,4 @@
export(luftlyr_friendlydf)
export(luftlyr_getdata)
export(luftlyr_getmeta)
......@@ -24,3 +24,24 @@ luftlyr_getdata <- function(x,...) {
res[which(res$TE_VALUE<0),"TE_VALUE"]<-NA
return(res)
}
#' luftlyr_getmeta
#' luftlyr_getmeta
#' @param x request object
#' @param ... authentication options
#' @keywords luftlyr
#' @export
#' @examples
#' \dontrun{
#' luftlyr_getmeta()
#' }
luftlyr_getmeta <- function(x,...) {
db <- luftkvalr::luftkvalr()
db$start(...)
tmp_st <- db$GetAQStations(stationIDs=x$stationObj$station_id)
tmp_ts <- db$GetAQTimeseries(stationIDs=tmp_st$ST_ID,componentName=x$elementObj$element_id)
db$stop()
colnames(tmp_ts) <- c("ID","NAME","ALT","LAT","LON","TS_ID","CO_NAME","TS_Z1","TS_Z2")
return(tmp_ts[,c(1:5,7)])
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/luftlyr_getdata.R
\name{luftlyr_getmeta}
\alias{luftlyr_getmeta}
\title{luftlyr_getmeta
luftlyr_getmeta}
\usage{
luftlyr_getmeta(x, ...)
}
\arguments{
\item{x}{request object}
\item{...}{authentication options}
}
\description{
luftlyr_getmeta
luftlyr_getmeta
}
\examples{
\dontrun{
luftlyr_getmeta()
}
}
\keyword{luftlyr}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment