-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.R
36 lines (28 loc) · 820 Bytes
/
server.R
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
library(tidyverse)
library(mapproj)
library(shiny)
library(astrolibR)
source("data.R")
source("coordinates.R")
source("plots.R")
# Define server logic required to draw a histogram
server <- function(input, output) {
output$planets <- DT::renderDataTable({
objects() %>%
select(name, ra, dec)
},
options = list(pageLength = 15, dom = "ftp"),
rownames = FALSE)
ha <- reactive({
ct2lst(input$long, "", date_to_jd(now(tz = "UTC")))
})
output$plot_all <- renderPlot({
plot_stars(lat = input$lat, ha = ha(), globe = FALSE)
})
output$plot_up <- renderPlot({
plot_stars(lat = input$lat, ha = ha())
})
output$plot_down <- renderPlot({
plot_stars(lat = -input$lat, ha = ha()+12)
})
}