Skip to content

Commit

Permalink
Merge pull request #91 from ESHackathon/nonplottable
Browse files Browse the repository at this point in the history
Add not plot option
  • Loading branch information
nealhaddaway committed Apr 13, 2022
2 parents 19570d2 + c358d43 commit 4fd3c57
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
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

0 comments on commit 4fd3c57

Please sign in to comment.