Instructions

Create a web page using R Markdown that features a map created with Leaflet.

Host webpage on either GitHub Pages, RPubs, or NeoCities.

Introduction

The Ivy League is an American collegiate athletic conference comprising sports teams from eight private universities in the Northeastern United States. The term Ivy League is typically used to refer to those eight schools as a group of elite colleges beyond the sports context. Ivy League has connotations of academic excellence, selectivity in admissions, and social elitism.

I am going to show all eight Ivy league Universities:

  1. Brown University

  2. Columbia University

  3. Cornell University

  4. Darmouth College

  5. Harvard University

  6. The University of Pennsylvania

  7. Princeton University

  8. Yale University

Data Packages

library(leaflet)
## Warning: package 'leaflet' was built under R version 3.5.3
library(knitr)

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

Map Ivy League

ivySites<-c("<a href= 'http://www.brown.edu/' >Brown</a>",
            "<a href= 'http://www.columbia.edu/'>Columbia</a>",
            "<a href= 'http://www.cornell.edu/'>Cornell</a> ",
            "<a href= 'http://home.dartmouth.edu/'>Darmouth</a>",
            "<a href= 'http://www.harvard.edu/'>Harvard</a>",
            "<a href= 'http://www.upenn.edu/'>university of Pennsylvania</a>",
            "<a href= 'http://www.princeton.edu/'>Princeton</a>",
            "<a href= 'http://www.yale.edu/'>yale</a>")

ivyLatLng<-data.frame(lat= c( 41.8268, 40.8075, 42.4534, 43.7044, 42.3770, 39.9522, 40.3431, 41.3163),
                      lng= c(-71.4025, -73.9626, -76.4735, -72.2887, -71.1167, -75.1932, -74.6551, -72.9223))

ivyLatLng %>%
  leaflet() %>%
  addTiles() %>%
  addMarkers(popup = ivySites)

R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

summary(cars)
##      speed           dist       
##  Min.   : 4.0   Min.   :  2.00  
##  1st Qu.:12.0   1st Qu.: 26.00  
##  Median :15.0   Median : 36.00  
##  Mean   :15.4   Mean   : 42.98  
##  3rd Qu.:19.0   3rd Qu.: 56.00  
##  Max.   :25.0   Max.   :120.00

Including Plots

You can also embed plots, for example:

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.