README.md 1.17 KB
Newer Older
Jean-Marie Lepioufle's avatar
Jean-Marie Lepioufle committed
1
# eipar
Jean-Marie Lepioufle's avatar
Jean-Marie Lepioufle committed
2
3
4


## Description
Jean-Marie Lepioufle's avatar
Jean-Marie Lepioufle committed
5
6
7
Extracting air quality timeseries from the [Irish Environmental Protection Agency](http://epa.ie/).

The irish EPA API provides free access to Irish air quality timeseries.
Jean-Marie Lepioufle's avatar
Jean-Marie Lepioufle committed
8

jml's avatar
jml committed
9
The package is in continuous development according to the development of the server API.
Jean-Marie Lepioufle's avatar
Jean-Marie Lepioufle committed
10
11
12
13
14
15
The package is working but might change at any time.


## Installation

```R
Jean-Marie Lepioufle's avatar
Jean-Marie Lepioufle committed
16
#devtools::install_github("r-lib/devtools")
jml's avatar
jml committed
17
library("devtools")
Jean-Marie Lepioufle's avatar
Jean-Marie Lepioufle committed
18
devtools::install_git("https://git.nilu.no/rextapi/eipar.git")
Jean-Marie Lepioufle's avatar
Jean-Marie Lepioufle committed
19
20
21
22
```

## Usage

23
```R
jml's avatar
jml committed
24
25
user <- "your_id"
pswd <- "your_paswd"
Jean-Marie Lepioufle's avatar
typo    
Jean-Marie Lepioufle committed
26
27

eipar <- eipar::api(httpauth = 1,userpwd=paste0(user,":",pswd))
28

jml's avatar
jml committed
29
30
31
#get an id
eipar$register()

32
33
34
# get some help
eipar$help()

jml's avatar
jml committed
35
36
37
38
39
40
41
42
43
44
45
46
# get_aq_measurements
eipar$help("get_aq_measurements")
res <- eipar$get_aq_measurements()

res <- eipar$get_aq_measurements(where="rawreadingid==644")
res <- eipar$get_aq_measurements(where="measurementunit==ppm")
res <- eipar$get_aq_measurements(where="measurementtype==Pollutant")
res <- eipar$get_aq_measurements(where="pollutantname==NO2")
res <- eipar$get_aq_measurements(where="pollutantname!=NO2")
res <- eipar$get_aq_measurements(where="measurementunit==ppm and rawdatavalue==0.9")

More examples in vignettes
47
48

```