R Shiny web app: Sea ice
I’ve made a new app using Shiny, an R package for publishing interactive web applications. This app was produced for the Marine Downscaling project. It provides the ability to examine trends in sea ice coverage over the Arctic projected into the future.
The modeled outputs come from five global climate models (GCMs), which have been regridded to common resolution, as well as a five-model averaged composite. The first main panel tab provides time series plots of total sea ice extent, plus fitted trends and trend model output if desired. The second tab provides a multi-panel map of the Arctic showing 2.5 by 2.5 degree resolution sea ice concentration values.
The primary tab, which shows sea ice extent totals as a time series, is more analytically useful than the secondary map tab. Extent totals are by month, winter season, summer season, or annual averages. Users can subset the time series to any range of years from 1860 to 2099. If they fit trend lines to the time series, the regression model is fit to only the years in their chosen range. Users have the option of using simple linear regression, linear regression with a quadratic term (time + time^2), or a locally weighted LOESS smoother. If the latter is chosen, the smoothing parameter can be adjusted by the user as well.
An overlay of landmass boundaries is added to the raster maps for easy reference, but note that it will not line up perfectly with the aggregated scale raster data. I had to adjust it by eye to the best of my ability, since there was simply no time to look for an alternative solution. The key thing to remember about the map tab is that it really serves no purpose other than to give users a visual sense of average sea ice concentration by month and decade. The picture is not itself an analytical product by any means, and so the ad hoc, imperfect overlay which is strictly for the user’s visual orientation, is acceptable. That said, I would like to find some time to make something better.
For those more interested in R and Shiny, I’ll mention a bit more about the features. I’ve included a download button which allows the user to obtain a pdf of the currently displayed graphic. I made use of
wellPanel to make the sidebar look cleaner.
I included an About tab, which you can refer to for any information about the app perhaps not mentioned here. You may also notice the custom header, with title aligned left and organizational logo aligned right, kept on the same line to avoid too much vertical white space at the top of the app pushing down the sidebar and main panel. Lastly, I read in each of the six multi-band .tif files (one for each of the five GCMs, plus the composite model) using
brick. This does happen up front before
shinyServer is called. It doesn’t take too long, but it’s not instantaneous either. For the time being I can’t think of a better way.