library(leaflet)
my_map <- leaflet() %>%
addTiles()
my_map
my_map <- my_map %>%
addMarkers(lat = 39.2980803, lng = -76.5898801, popup = "Jeff Leek's Office")
my_map
print("today is:"); date()
## [1] "today is:"
## [1] "Sun Nov 5 17:26:35 2017"
NFL_icons <- c(makeIcon(
iconUrl = "http://athlonsports.com/sites/athlonsports.com/files/shared/nfl/NFL_Logos/NFL_shield_logo.jpg",
iconWidth = 31*215/230, iconHeight = 31,
iconAnchorX = 31*215/230/2, iconAnchorY = 16
)
)
df_stadiums <- data.frame(
lat = c(40.813611,32.747778,33.7575 ,39.278056,35.225833,
41.8625 ,39.095444,41.506111,39.743889,42.34 ,
42.090944,33.5275 ,44.501389,29.684722,39.760056 ,
30.323889,39.048889,38.907778, 25.958056,44.973889,
36.166389,29.950833,37.751667,42.773611,39.900833 ,
40.446667,38.632778,32.783056,37.713611,47.595278 ,
27.975833,40.814620),
lng = c(-74.074444,-97.092778,-84.400833 ,-76.622778,-80.852778,
-87.616667,-84.516039,-81.699444 ,-105.02 ,-83.045556,
-71.264344,-112.2625 ,-88.062222 ,-95.410833,-86.163806,
-81.6375 ,-94.483889,-76.864444 ,-80.238889,-93.258056,
-86.771389,-90.081111,-122.200556,-78.786944,-75.1675 ,
-80.015833,-90.188611,-117.119444,-122.386111,-122.331667,
-82.503333,-74.074550))
name = c("MetLife Stadium","Cowboys Stadium","Georgia Dome","M&T Bank Stadium","Bank of America Stadium",
"Soldier Field","Paul Brown Stadium","FirstEnergy Stadium","Sports Authority Field","Ford Field",
"Gillette Stadium","University of Phoenix Stadium","Lambeau Field","Reliant Stadium","Lucas Oil Stadium",
"EverBank Field","Arrowhead Stadium","FedExField","Sun Life Stadium","Metrodome",
"LP Field","Superdome","Oakland Coliseum","Ralph Wilson Stadium","Lincoln Financial Field",
"Heinz Field","Edward Jones Dome","Qualcomm Stadium","Candlestick Park","CenturyLink Field",
"Raymond James Stadium","MetLife Stadium")
nfl_stadiums <- leaflet(df_stadiums) %>%
addTiles() %>%
addMarkers(popup = name,clusterOptions = markerClusterOptions(), icon = NFL_icons)
nfl_stadiums