diff --git a/DESCRIPTION b/DESCRIPTION index b117cffd1d82b83bdb069f422ab5731a0a7168b1..9dbd6ba4a36ec9f37f9cc2889e4c6696f9f67831 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -6,9 +6,9 @@ Authors@R: c(person("Jean-Marie", "Lepioufle", , "jml@nilu.no", role=c("aut","cr Title: friendlyr Description: Make remote timeserie dataset easy to get and to work with. The package focuses on: - 1. importing key functions from a chosen remote dataset. + 1. importing key libraries related to a specific remote dataset. 2. authentication to the related database/db/api. - 3. having access to the related database/db/api. + 3. having access to the related database/db/api/embedded dataset. 4. having timeserie dataset in a friendly format. 5. checking the date timeserie. 6. having metadata. diff --git a/vignettes/data.eimet.Rmd b/vignettes/data.eimet.Rmd index a49c667e9e388922b8515f990c488a0a181aeefc..3320104bd632372b5d7bdd1b0658554aa7ec2b8e 100644 --- a/vignettes/data.eimet.Rmd +++ b/vignettes/data.eimet.Rmd @@ -11,6 +11,12 @@ vignette: > library(friendlyr) knitr::opts_chunk$set(collapse = T, comment = "#>") ``` +## install +```R +library("devtools") +devtools::install_git("https://git.nilu.no/rfriendlyr/friendlyr.git") +devtools::install_git("https://git.nilu.no/rfriendlyr/d.eimetlyr.git") +``` ## Get timeseries data diff --git a/vignettes/data.eipa.Rmd b/vignettes/data.eipa.Rmd index a821057729b760db6650bafb495f90425429da95..d59b1421c106033e65bcec0a10bf5b7c65fc00fd 100644 --- a/vignettes/data.eipa.Rmd +++ b/vignettes/data.eipa.Rmd @@ -11,6 +11,12 @@ vignette: > library(friendlyr) knitr::opts_chunk$set(collapse = T, comment = "#>") ``` +## install +```R +library("devtools") +devtools::install_git("https://git.nilu.no/rfriendlyr/friendlyr.git") +devtools::install_git("https://git.nilu.no/rfriendlyr/d.eipalyr.git") +``` ## Get timeseries data diff --git a/vignettes/data.luftkval.oslo10.Rmd b/vignettes/data.luftkval.oslo10.Rmd new file mode 100644 index 0000000000000000000000000000000000000000..ac6ea207b726aed82da6abedaa6d567bcd022a23 --- /dev/null +++ b/vignettes/data.luftkval.oslo10.Rmd @@ -0,0 +1,56 @@ +--- +title: "data.eimet" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{data.eimet} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r setup, include = FALSE} +library(friendlyr) +knitr::opts_chunk$set(collapse = T, comment = "#>") +``` + +## install +```R +library("devtools") +devtools::install_git("https://git.nilu.no/rfriendlyr/friendlyr.git") +devtools::install_git("https://git.nilu.no/rfriendlyr/d.luft.oslyr.git") +``` + +## Get timeseries data + +Get data from luftkval.oslo10 embedded dataset. + +```R +fromDate="2008/03/01 02:00:00" +toDate="2008/03/01 09:00:00" +timeResolution="hourly" + +station_id=c("7","848","464","827","665","9","11","163","504","809") +element_id=c("NO2") +location <- NULL + + +df <- friendlyr::ts(service="d.luft.oslyr", + fromDate=fromDate,toDate=toDate,precision=timeResolution,timeResolution=timeResolution, + element_id=element_id,station_id=station_id) + + +``` +## Get metadata + +```R +metadata <- friendlyr::meta(service="d.luft.oslyr",station_id=station_id) + +``` + +## Get Quality flags + +```R +df <- friendlyr::qa(service="d.luft.oslyr", + fromDate=fromDate,toDate=toDate,precision=timeResolution,timeResolution=timeResolution, + element_id=element_id,station_id=station_id) + +``` diff --git a/vignettes/frost.Rmd b/vignettes/frost.Rmd index 350b020ee5257f723498af720d1d24295df8c3fb..a8c2bb2418727c241e8949607cb7dfbb5b29dd63 100644 --- a/vignettes/frost.Rmd +++ b/vignettes/frost.Rmd @@ -11,6 +11,12 @@ vignette: > library(friendlyr) knitr::opts_chunk$set(collapse = T, comment = "#>") ``` +## install +```R +library("devtools") +devtools::install_git("https://git.nilu.no/rfriendlyr/friendlyr.git") +devtools::install_git("https://git.nilu.no/rfriendlyr/frostlyr.git") +``` ## Get timeseries data diff --git a/vignettes/innosense.Rmd b/vignettes/innosense.Rmd index 038343519f5f121dba8b5c205258a3cec301e64f..1679550be363d6daed056acbb68a0668cd2f045c 100644 --- a/vignettes/innosense.Rmd +++ b/vignettes/innosense.Rmd @@ -12,7 +12,12 @@ library(friendlyr) knitr::opts_chunk$set(collapse = T, comment = "#>") ``` -# Get the data from Innosense database +## install +```R +library("devtools") +devtools::install_git("https://git.nilu.no/rfriendlyr/friendlyr.git") +devtools::install_git("https://git.nilu.no/rfriendlyr/innolyr.git") +``` ## Get the timeseries at specific stations diff --git a/vignettes/luftkvalitet.Rmd b/vignettes/luftkvalitet.Rmd index 487f4185df9172a2f776c7ab70d4c7db30da7a3c..f5f88ad4412b03cc4778f1857934e3ac816614ed 100644 --- a/vignettes/luftkvalitet.Rmd +++ b/vignettes/luftkvalitet.Rmd @@ -11,7 +11,12 @@ vignette: > library(friendlyr) knitr::opts_chunk$set(collapse = T, comment = "#>") ``` - +## install +```R +library("devtools") +devtools::install_git("https://git.nilu.no/rfriendlyr/friendlyr.git") +devtools::install_git("https://git.nilu.no/rfriendlyr/luftlyr.git") +``` ## Get the timeseries data Get data from the luftkvalitet database. @@ -34,8 +39,6 @@ luft <- friendlyr::ts(service="luftlyr",username="****",password="****", element_id=c("NO2","O3"),location="Oslo,Norway") -plot(luft,target=c("NO2_7","NO2_848"),DESKTOP=TRUE) - ``` ## Get the timeseries QA data @@ -60,7 +63,6 @@ luft_qa <- friendlyr::qa(service="luftlyr",username="****",password="****", element_id=c("NO2","O3"),location="Oslo,Norway") -plot(luft_qa,target=c("NO2_7","NO2_848"),DESKTOP=TRUE) ``` ## Get the metadata data