Project Overview

Based on the requirement in the course project instruction, the assignment instruction contains a requirement for creating a web page through R Markdown with a map inside. The map should be created by package Leaflet.

The webpage should be hosted on Github Pages, RPubs, or NeoCities. The review criteria is as follows,

  1. Does the web page feature a date and is this date less than two months before the date that youโ€™re grading this assignment?

  2. Does the web page feature an interactive map that appears to have been created with Leaflet?

Introduction

This report presents a map of the southern part of China. The education level of this area is relatively high and there are many famous university located in this area. This report will presents the location, name and the rank of ten university in this area.

The Location Presentation

In this section, I use the R package leaflet to insert a map with 10 high rating universities inside. The information of these universities contains the detailed names and ranks. The R code is as follows.

# Load the package
library(leaflet)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(readxl)
# Load and process the data
location<-read_xlsx("University data.xlsx")
location %>% leaflet() %>%
        addTiles() %>%
        addMarkers(
                lat = location$Latitude, 
                lng = location$Longitude, 
                popup = paste(location$Location, "<br>", "Rank:", location$Rank),
                clusterOptions = markerClusterOptions())