Introduction
For this project, I have taken data that ranks the tallest 50 roller coasters in the world. This data specifies location and the height in feet of each roller coaster.

Data Preparation
First we need to read in the data set using the read.csv function because this data is in excel format.

Coaster <- read.csv("Roller Coaster Data.csv", stringsAsFactors = FALSE)

We can also view the structure of the data set.

str(Coaster)
## 'data.frame':    50 obs. of  8 variables:
##  $ Rank       : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ Height..ft.: int  456 420 415 377 368 325 318 310 306 305 ...
##  $ Name       : chr  "Kingda Ka" "Top Thrill Dragster " "Superman: Escape From Krypton" "Tower of Terror II" ...
##  $ Park       : chr  "Six Flags Great Adventure" "Cedar Point" "Six Flags Magic Mountain" "Dreamworld" ...
##  $ Location   : chr  "Jackson, New Jersey" "Sandusky, Ohio" "Valencia, California" "Queensland" ...
##  $ Country    : chr  "United States" "United States" "United States" "Austrailia" ...
##  $ Latitude   : num  40.1 41.5 34.4 -27.9 41.1 ...
##  $ Longitude  : num  -74.44 -82.69 -118.6 153.32 1.15 ...

Using required Packages
Now we can map the data with points we can view. We must also load the required packages.

library(leaflet)
## Warning: package 'leaflet' was built under R version 4.1.3
library(htmltools)

Creating a data frame and the map In order to manipulate the data like a table, we need to create a data frame. Then we can create our map.

maps <- data.frame(Ranking = Coaster$Rank,
                   Name = Coaster$Name,
                   Park = Coaster$Park,
                   Country = Coaster$Country,
                   Location = Coaster$Location,
                   Height = Coaster$Height,
                   Latitude = Coaster$Latitude,
                   Longitude = Coaster$Longitude)
     
    
map <- maps %>%
  leaflet() %>%
  addTiles() %>%
  addMarkers(popup = paste
             ("<br>Country: ",
               htmlEscape(maps$Country),
               "<br>Location: ",
               htmlEscape(maps$Location),
               "<br>Park: ",
               htmlEscape(maps$Park),
               "<br>Height in Feet: ",
               htmlEscape(maps$Height),
               "<br>Name: ",
               htmlEscape(maps$Name),
               "<br>Ranking: ",
               formatC(Coaster$Rank, format = "d", big.mark = ",")
               )
  )
## Assuming "Longitude" and "Latitude" are longitude and latitude, respectively
map