Title: "Project using R-Markdown and Leaflet to produce a web page of a map with hovering capability"
Author: "Elek Dobos"
Date: "February 2, 2017"
output: html_document
#Summary Description
A dataset was provided by NOAA - National Weather Service.
The dataset pertains to Super Storm Sandy that impacted the Eastern United States during October 2012.
When a user of the web page higlights the data marker; the latitude, longitude, county name, state Name,
high water mark elevation, and high water mark location description.
The data was previously downloaded and read in from our default directory.
Load the necessary libaries.
```r
library(googleVis)
library(leaflet)
```
Read in our data set.
```r
stormData <- read.csv(file="./FilteredHWMs.csv", header=TRUE)
```
Do not print our header data, since it takes too much space.
Create the hover data set for each data point. Create the pop-up dialog for the map.
```r
stormData$hover <- with(stormData, paste("Latitude: ",latitude_dd, "
", "Longitude: ",longitude_dd , "
", "County Name: ",countyName, "
", "State Name: ",stateName, "
", "High Water Mark Elevation: ",elev_ft, "
", "High Water Mark Location Description: ",hwm_locationdescription))
stormData %>%
leaflet() %>%
addTiles() %>%
addCircleMarkers(weight=1, radius=(sqrt(stormData$latitude_dd))/2,
popup = stormData$hover)
```