-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
71 lines (44 loc) · 2.41 KB
/
README.Rmd
File metadata and controls
71 lines (44 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
[](https://travis-ci.org/mdsumner/raodn)
# raodn
The goal of raodn is to ...
## Installation
You can install raodn from github with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("mdsumner/raodn")
```
## Example
This is a basic example that gets some Argo data.
```{r}
library(raodn)
## read Argo data from AODN
example("read_aodn_csv")
library(ggplot2)
ggplot(d[d$pres < 100, ]) + aes(longitude, latitude, col = psal) + geom_point()
ggplot(d) + aes(psal, -pres, col = temp) +
geom_point() +
facet_wrap(~platform_number)
```
```{r example, eval = FALSE, include = FALSE}
u <- "http://geoserver-123.aodn.org.au/geoserver/ows?typeName=imos:argo_profile_data&SERVICE=WFS&outputFormat=JSON&REQUEST=GetFeature&VERSION=1.0.0&CQL_FILTER=INTERSECTS(position%2CPOLYGON((147.07397460938%20-44.989990234375%2C147.07397460938%20-43.891357421875%2C148.15063476563%20-43.891357421875%2C148.15063476563%20-44.989990234375%2C147.07397460938%20-44.989990234375)))%20AND%20oxygen_sensor%20%3D%20true"
system(sprintf("ogrinfo '%s'", u))
library(rgdal)
x <- readOGR(u, "OGRGeoJSON")
u <- "http://geoserver-123.aodn.org.au/geoserver/ows?typeName=imos:argo_profile_data&SERVICE=WFS&outputFormat=csv&REQUEST=GetFeature&VERSION=1.0.0"
u <- "http://geoserver-123.aodn.org.au/geoserver/ows?typeName=imos:argo_profile_data&SERVICE=WFS&outputFormat=csv&REQUEST=GetFeature&VERSION=1.0.0&CQL_FILTER=INTERSECTS(position%2CPOLYGON((147.07397460938%20-44.989990234375%2C147.07397460938%20-43.891357421875%2C148.15063476563%20-43.891357421875%2C148.15063476563%20-44.989990234375%2C147.07397460938%20-44.989990234375)))%20AND%20oxygen_sensor%20%3D%20true"
u <- "http://geoserver-123.aodn.org.au/geoserver/ows?typeName=imos:argo_profile_data&SERVICE=WFS&outputFormat=JSON&REQUEST=GetFeature&VERSION=1.0.0&CQL_FILTER=INTERSECTS(position%2CPOLYGON((147.07397460938%20-44.989990234375%2C147.07397460938%20-43.891357421875%2C148.15063476563%20-43.891357421875%2C148.15063476563%20-44.989990234375%2C147.07397460938%20-44.989990234375)))%20AND%20oxygen_sensor%20%3D%20true"
x <- readLines(u)
library(rgdal)
ogrListLayers(u)
```