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

turn luflyr into pure libraries

parent 57851adf
......@@ -5,11 +5,9 @@ Authors@R: c(person("Jean-Marie", "Lepioufle", , "jml@nilu.no", role=c("aut","cr
person("NILU",role="cph"))
Title: luftlyr
Description: Make luftkvalitet dataset easy to manipulate.
The package adapt friendlyr to luftkvalitet:
1. authentication to the storage
2. having timeserie dataset in a friendly format
3. having metadata
4. exporting dataset
The package provides:
1. libraries to access luftkvalitet
2. get friendly data.frame to work with
Depends:
R (>= 3.2.0)
Imports:
......
# Generated by roxygen2: do not edit by hand
export(luftlyr)
export(luftlyr_friendlydf)
export(luftlyr_getdata)
#' luftlyr
#' luftlyr
#' @param ... authentication options
#' @keywords luftlyr
#' @export
#' @examples
#' \dontrun{
#' luftlyr()
#' }
luftlyr <- function(...){
return(friendlyr::friendlyr(session_name="luftlyr", fn_get=luftlyr_getdata, fn_friendly=luftlyr_friendlydf,...))
}
#' luftlyr_friendlydf
#' luftlyr_friendlydf
#' @param x request object
#' @param res resulted data.frame
#' @keywords luftlyr
#' @export
#' @examples
#' \dontrun{
#' luftlyr_friendlydf()
#' }
luftlyr_friendlydf <- function(x,res){
if (x$dateStructObj$COL_DATE) {
tmp <- friendly_df_(x=x,ugly_df=res)
......
#' luftlyr_getdata
#' luftlyr_getdata
#' @param x request object
#' @param ... authentication options
#' @keywords luftlyr
#' @export
#' @examples
#' \dontrun{
#' luftlyr_getdata()
#' }
luftlyr_getdata <- function(x,...) {
db <- luftkvalr::luftkvalr()
db$start(...)
......
......@@ -3,12 +3,11 @@
## Description
luftlyr makes luftkvalitet dataset easy to manipulate.
The package adapt friendlyr to luftkvalitet:
1. authentication to the storage
2. having timeserie dataset in a friendly format
3. having metadata
4. exporting dataset
The package makes luftkvalitet dataset easy to manipulate.
The package provides:
1. libraries to access luftkvalitet
2. get friendly data.frame to work with
## Prerequisite
......@@ -23,13 +22,3 @@ source("https://raw.githubusercontent.com/r-lib/remotes/master/install-github.R"
library("remotes")
remotes::install_git("https://git.nilu.no/rfriendlyts/luftlyr.git")
```
## Usage
```R
test <- luftlyr::luftlyr(username="******",password="******")
test$data(fromDate="2016/11/01 00:00:00",toDate="2017/05/01 00:00:00",
precision="hourly",timeResolution="hourly",
element_id=c("NO2","NO"),
station_id="665",
```
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/luftlyr_friendlydf.R
\name{luftlyr_friendlydf}
\alias{luftlyr_friendlydf}
\title{luftlyr_friendlydf
luftlyr_friendlydf}
\usage{
luftlyr_friendlydf(x, res)
}
\arguments{
\item{x}{request object}
\item{res}{resulted data.frame}
}
\description{
luftlyr_friendlydf
luftlyr_friendlydf
}
\examples{
\dontrun{
luftlyr_friendlydf()
}
}
\keyword{luftlyr}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/luftlyr.R
\name{luftlyr}
\alias{luftlyr}
\title{luftlyr
luftlyr}
% Please edit documentation in R/luftlyr_getdata.R
\name{luftlyr_getdata}
\alias{luftlyr_getdata}
\title{luftlyr_getdata
luftlyr_getdata}
\usage{
luftlyr(...)
luftlyr_getdata(x, ...)
}
\arguments{
\item{x}{request object}
\item{...}{authentication options}
}
\description{
luftlyr
luftlyr
luftlyr_getdata
luftlyr_getdata
}
\examples{
\dontrun{
luftlyr()
luftlyr_getdata()
}
}
\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