Developing Shiny Applications: Using Leaflet in R
R is an open source statistical programming language. The R Shiny package provides a web application framework for R using the Twitter Bootstrap framework. Integrating leaflet into Shiny applications can lead to rapid deployment of interactive mapping tools. I will showcase three tools as we explore this topic.
1. Water Quality Portal Data Discovery Tool
The national Water Quality Portal (WQP) combines physical, chemical and biological water quality data from multiple data sources and serves the data out in one format. The Portal provides a central location for the storage of observational data affecting water quality on a national scale. Existing web services can call on the Portal and provide access, but no directly linked analytical tools are currently available. RTI in partnership with EPA developed the WQP Data Discovery tool to provide users with an easy to use interface to query, summarize, QC and display data from the Portal. This tool is meant to help users navigate a dataset and determine what data are available to perform their analyses against. The Data Discovery tool is a desktop application that uses open source R, a statistical programming language and several add-on packages, to visualize data and to assist users in selecting data they may need for analysis.
2. Toxics and Climate Change Tool
This web application uses data from the Toxic Release Inventory (TRI) to create a data set approximating that collected under EPCRA for the nation. Ten years of TRI data (2004-2013) was obtained from the National Library of Medicine (NLM) in the format used in their TOXMAP application. We allow the user to examine this proxy data set of hazardous chemical storage locations in conjunction with NOAA Sea Level Rise Scenarios and projections of extreme heat in 2030 to examine potential exposure risks associated with climate change. The sea level rise scenarios can also be used to view potential flooding risks from extreme storms. The data showing projections of extreme heat available in this map are derived from the A2 high emissions scenario for the year 2030.
3. Wake County Food Violations Explorer
This web tool allows the user to explore food safety violations in Wace County, NC from 2010 through 2015. This tool is being used for exploratory purposes in the development of a model to predict food pathogen outbreaks.