-
Notifications
You must be signed in to change notification settings - Fork 3
/
plot_ui.Rd
55 lines (44 loc) · 1.17 KB
/
plot_ui.Rd
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_module.R
\name{plot_ui}
\alias{plot_ui}
\alias{plot_server}
\title{NOAA plot module}
\usage{
plot_ui(id)
plot_server(id, NOAA, points)
}
\arguments{
\item{id}{Namespace id shiny module.}
\item{NOAA}{Reactive value for the dataset containing the locations
coordinates.}
\item{points}{Add locations of extracted point geometry.}
}
\value{
Shiny module.
}
\description{
This shiny module (\code{plot_ui()} + \code{plot_server()}) visualizes the loaded
data according to the selected epsg projection (\code{"original"}, \code{"4326"},
\code{"3031"}, or \code{"3995"}). In addition it provides an interactive plot
interface to select location for data extraction based on a single-click.
}
\examples{
# run plot module stand-alone
if (interactive()) {
library(oceanexplorer)
library(shiny)
# data
NOAA <- get_NOAA("oxygen", 1, "annual")
# coordinates
points <- filter_NOAA(NOAA, 1, list(lon = c(-160, -120), lat = c(11, 12)))
# gui
ui <- fluidPage(plot_ui("plot"))
# server
server <-function(input, output, session) {
plot_server("plot", reactive(NOAA), reactive(points))
}
# run app
shinyApp(ui, server)
}
}