@@ -58,8 +58,8 @@ loadTraitData <- function(startDate, endDate) {
5858 # loop through all days in a given season
5959 while (endDate - currDate != 0 ) {
6060 # get trait data for each day
61- currTraitData <- betydb_query(table = ' traits' , date = paste0(' ~' , currDate ), limit = ' 5 ' )
62- fullTraitData <- rbind(fullTraitData , currTraitData )
61+ currTraitData <- betydb_query(table = ' traits' , date = paste0(' ~' , currDate ), limit = ' none ' )
62+ fullTraitData <- rbind(fullTraitData , currTraitData [c( ' date ' , ' mean ' , ' variable_id ' , ' specie_id ' )] )
6363 currDate <- currDate + days(1 )
6464
6565 # update progress bar
@@ -104,7 +104,7 @@ server <- function(input, output) {
104104 output $ selectVariable <- renderUI({
105105
106106 # get access to 'fullTraitData'
107- data.cache(cache.name = cacheName(), loadTraitData , startDate = seasonStartDate(), endDate = seasonEndDate())
107+ data.cache(cache.name = cacheName(), loadTraitData , startDate = seasonStartDate(), endDate = seasonEndDate(), frequency = ' daily ' )
108108
109109 # get unique variable ids from observations in current season
110110 variableIds <- unique(as.numeric(fullTraitData $ variable_id ))
0 commit comments