# install.packages("oce", dependencies = TRUE)
library(oce)
## Loading required package: gsw
## Loading required package: testthat
Oce
는 오픈 소스 시스템으로 소개하고 있기 때문에, 관련 학문에 종사하는 사람들이 참여 해주는 것이 해당 패키지 발전에 매우 중요한 부분이다.data(buoy, package = "ocedata")
theta <- (90 - buoy$direction) * pi / 180
u <- -buoy$wind*cos(theta)
v <- -buoy$wind*sin(theta)
s <- c(-1, 1) * max(buoy$wind, na.rm = TRUE)
plot(u, v, xlab = "u [m/s]", ylab = "v [m/s]", xlim=s, ylim=s, asp=1)
for (ring in seq(5, 30, 5))
lines(ring*cos(seq(0, 2*pi, pi/32)),
ring*sin(seq(0, 2*pi, pi/32)), col="gray")
library(WaveletComp)
data(soi, package = "ocedata")
date <- seq(ISOdatetime(soi$year[1], 1, 1, 0, 0, 0, tz = "UTC"),
length.out = length(soi$year), by = "1 month")
w <- analyze.wavelet(data.frame(date = date, index = soi$index),
"index", dt = 1/12, lowerPeriod = 1)
## Smoothing the time series...
## Starting wavelet transformation...
## ... and simulations...
##
|
| | 0%
|
|= | 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%
|
|================================================== | 72%
|
|=================================================== | 73%
|
|==================================================== | 74%
|
|==================================================== | 75%
|
|===================================================== | 76%
|
|====================================================== | 77%
|
|======================================================= | 78%
|
|======================================================= | 79%
|
|======================================================== | 80%
|
|========================================================= | 81%
|
|========================================================= | 82%
|
|========================================================== | 83%
|
|=========================================================== | 84%
|
|============================================================ | 85%
|
|============================================================ | 86%
|
|============================================================= | 87%
|
|============================================================== | 88%
|
|============================================================== | 89%
|
|=============================================================== | 90%
|
|================================================================ | 91%
|
|================================================================ | 92%
|
|================================================================= | 93%
|
|================================================================== | 94%
|
|================================================================== | 95%
|
|=================================================================== | 96%
|
|==================================================================== | 97%
|
|===================================================================== | 98%
|
|===================================================================== | 99%
|
|======================================================================| 100%
## Class attributes are accessible through following names:
## series loess.span dt dj Wave Phase Ampl Power Power.avg Power.pval Power.avg.pval Ridge Period Scale nc nr coi.1 coi.2 axis.1 axis.2 date.format date.tz
wt.image(w, plot.ridge = FALSE, siglvl = 0.005, color.key = "i", show.date = TRUE)
library(oce)
par(mar=rep(0.5, 4))
data(endeavour, package = "ocedata")
data("coastlineWorld")
mapPlot(coastlineWorld, type = "l", fill = "gray")
## Warning: In mapPlot() : 'fill' being accepted for backwards compatibility;
## please use 'col' instead
mapPoints(endeavour$longitude, endeavour$latitude, pch = 20, col = 'red')
data
, metadata
, processingLog
로 구성이 되어 있다.
data
는 보통 수압, 온도 등의 기록이 저장된다.metadata
는 데이터 수집 위치 등이 저장된다.processingLog
는 각 객체들이 어떻게 생성되었는지 기록한 로그라고 보면 된다.[[
notation 쓰는 방법을 추천한다.https://www.earthdatascience.org/tags/data-exploration-and-analysis/data-visualization/