Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add not plot option #91

Merged
merged 1 commit into from
Apr 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions server.R
Original file line number Diff line number Diff line change
Expand Up @@ -711,10 +711,13 @@ shinyServer(
dplyr::select(input$map_lng_select)))

# replace missing lat/long with standard locations chosen by 'nonplotted' input
if(input$nonplotted == 'mid Atlantic'){
if(input$nonplotted == 'Not plotted'){
lat_plotted
lng_plotted
} else if(input$nonplotted == 'mid Atlantic'){
lat_plotted[is.na(lat_plotted)] <- 0
lng_plotted[is.na(lng_plotted)] <- -20
} else if(input$nonplotted == 'south Pacific'){
} else if(input$nonplotted == 'south Pacific'){
lat_plotted[is.na(lat_plotted)] <- -65
lng_plotted[is.na(lng_plotted)] <- -124
} else if(input$nonplotted == 'mid Pacific'){
Expand Down
2 changes: 1 addition & 1 deletion ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ body <- dashboardBody(
uiOutput("map_columns"),
selectInput("nonplotted",
label = "Select where to plot studies without lat/long",
choices = c('mid Atlantic', 'south Pacific', 'mid Pacific', 'Equator 0 degrees', 'Greenland'),
choices = c('mid Atlantic', 'south Pacific', 'mid Pacific', 'Equator 0 degrees', 'Greenland', 'Not plotted'),
selected = 'mid Atlantic'
)
),
Expand Down