install.packages("leaflet")

Today’s Date: 12/29/19

Map of the NFL Green Bay Packers Wins weighted by score

library(leaflet)



packers_wins<-data.frame(name = c("Chicago","Minneapolis","Denver","Dallas","Detroit","Los Angeles","Kansas City","Carolina","New York","Washington"),
                         score = c(10,21,27,34,23,42,27,24,31,20),
                         latitude =  c(41.8781,44.9778,39.7392,32.7767,42.3314,34.0522,39.0997,35.7596,40.7128,47.7511),
                         longitude  = c(-87.6298,-93.265,-104.9903,-96.797,-83.0458,-118.2437,-94.5786,-79.0193,-74.006,-120.7401)
                         )




packers_wins %>%
  leaflet() %>%
  addTiles() %>%
  addCircles(weight = 1, radius = sqrt(packers_wins$score) *50000)
## Assuming "longitude" and "latitude" are longitude and latitude, respectively