Up-to-date daily data: Alaska precipitation app + ACIS API
I have made a number of updates to my Alaska historical daily precipitation web application made in R with the
shiny package. The updates fall into two general categories. First, with recent additions to the ever-expanding functionality of Shiny, it has become very easy to integrate
selectize.js via the same old
selectInput function, for which
selectize.js now provides the default behavior. This has yielded some nice functional and aesthetic changes.
Second, I have enhanced a number of aspects of the user-server reactivity. The biggest improvement by far is the switch from having a fixed (and immediately outdated) dataset stored in the app, which I would have to update regularly (and never have time to do), to having no data stored in the app other than station ID codes. Instead, the app makes use of the Applied Climate Information System (ACIS) API to get daily precipitation data in real-time from their database up to the previous day when the user selects a location for plotting.
I borrowed this code from another app I am working on that I designed with this strategy in mind from the outset, because it is nationwide and not restricted to 20 weather stations in Alaska. For the nationwide app it would have been too much to store the data in the app itself and horribly frustrating to update with any frequency, just wasteful duplication. Click the image to explore the app.