Shiny App to access NOAA data
This article is originally published at https://r-video-tutorial.blogspot.com/Now that the US Government shutdown is over, it is time to download NOAA weather daily summaries in bulk and store them somewhere safe so that at the next shutdown we do not need to worry.
Below is the code to download data for a series of years:
An example on how to use this function is below:
Theoretically, the process can be parallelized using parLappy, but I have not tested it.
Once we have all the file in one folder we can create the Shiny app to query these data.
The app will have a dashboard look with two tabs: one with a Leaflet map showing the location of the weather stations (markers are shown only at a certain zoom level to decrease loading time and RAM usage), below:
The other tab will allow the creation of the time-series (each file represents only 1 year, so we need to bind several files together to get the full period we are interested in) and it will also do some basic data cleaning, e.g. turn T from F to C, or snow depth from inches to mm. Finally, from this tab users can view the final product and download a cleaned csv.
The code for ui and server scripts is on my GitHub:
Please visit source website for post related comments.