Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
RextApi
eipar
Commits
495f98fb
Commit
495f98fb
authored
Apr 23, 2018
by
Jean-Marie Lepioufle
Browse files
clean the files
parent
49b25701
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
495f98fb
# eipar
r
# eipar
## Description
The package is a client api to get air quality observation from the
[
Irish Environmental Protection Agency
](
http://epa.ie/
)
.
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.
The package is developed continuously with the development of the server API.
The package is working but might change at any time.
...
...
README0.md
deleted
100644 → 0
View file @
49b25701
The R-package helps extracting data from the luftkval database.
The package has four purposes:
0.
Code is written in order to avoid any SQL Injection Attack.
1.
Quickly extracting stations informations.
2.
Quickly extracting timeseries informations.
3.
Quickly extracting dataset.
## Prerequisite
Some sql drivers are required: odbc and oracle
Please read the
[
documentation
](
https://git.nilu.no/rdbnilu/database-and-r/blob/master/01-pre-required.md
)
on gitlab.
Install the "remotes" R-package
```
R
source
(
"https://raw.githubusercontent.com/r-lib/remotes/master/install-github.R"
)
$
value
(
"r-lib/remotes"
)
```
## Installation
```
R
library
(
remotes
)
remotes
::
install_git
(
"git@git.nilu.no:rdbnilu/luftkvalr.git"
)
```
## Usage
```
R
library
(
"luftkvalr"
)
#settings
db
<-
luftkvalr
()
db
$
start
(
username
=
"********"
,
password
=
"********"
)
# get values at one station
tmp_st
<-
db
$
GetAQStations
(
stationIDs
=
"665"
)
$
ST_ID
tmp_ts
<-
db
$
GetAQTimeseries
(
stationIDs
=
tmp_st
,
componentName
=
c
(
"NO2"
))
$
TS_ID
res
<-
db
$
GetAQData
(
stationIDs
=
tmp_st
,
timeSeriesIDs
=
tmp_ts
,
fromDateTime
=
"2016-11-01 00:00:00"
,
toDateTime
=
"2016-11-02 00:00:00"
)
# get values at stations in Oslo
tmp_st
<-
db
$
GetAQStations
(
west
=
10.57911
,
south
=
59.75327
,
east
=
10.89911
,
north
=
60.07327
)
$
ST_ID
tmp_ts
<-
db
$
GetAQTimeseries
(
stationIDs
=
unique
(
tmp_st
),
componentName
=
c
(
"NO2"
))
$
TS_ID
res
<-
db
$
GetAQData
(
stationIDs
=
unique
(
tmp_st
),
timeSeriesIDs
=
tmp_ts
,
fromDateTime
=
"2016-11-01 00:00:00"
,
toDateTime
=
"2016-11-02 00:00:00"
)
# stop connection
db
$
stop
()
```
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment