ua-snap / shiny-apps

R Shiny apps
234 stars 191 forks source link

CMIP3 / CMIP5 app - Spatial distributions file load #102

Closed leonawicz closed 9 years ago

leonawicz commented 10 years ago

Consider adding a dat_spatial_master() object analogous to the dat_master() object. This could make subsequent alterations to data selection occur more rapidly. The master data object containing spatial samples could potentially be required to be reloaded only when changing region selection (or climate variable, if the master does not automatically load both, though I'm thinking it shouldn't). Any other changes would require only a new subset to be generated from the master object and no file loading would be required.

This may be tricky in the context of (1) current data selection reactivity rules and (2) city selection options.

leonawicz commented 9 years ago

For GCM distributions, which are the heaviest load, this has been changed to only load the requested data to begin with. This is a consequence of breaking out the originally much larger .RData files for each location into 80 .RData files per location. Files now each contain data for only a single location and climate variable as before, but also now a single climate scenario, climate model, as well as a single historical period file per scenario.

This refactoring of files and corresponding app code is only for GCM spatial distributions. CRU spatial distributions are left alone, since they are much smaller in file size.