Week 2 Project of the course Developing Data Products under the course track Data Science
Submitted by Olusola Afuwape
September 12th 2019
The University of Ibadan (UI) is the oldest higher institution in Nigeria. See University of Ibadan. This project is to show the alma mater.
# Load packages
suppressPackageStartupMessages(library(dplyr))
suppressPackageStartupMessages(library(leaflet))
# URL of locations on and off campus
alma_mata_environs <- c( "<a href='http://www.ui.edu.ng/'>UI Gate</a>",
"<a href='https://www.researchgate.net/figure/Trenchard-Hall-University-of-Ibadan-assembly-hall-illustrating-international-style_fig5_315560575'>Trenchard</a>",
"<a href='https://www.ui.edu.ng/gallery/awba-dam-university-ibadan'>Awba Dam</a>",
"<a href='https://vet.ui.edu.ng/'>Faculty of Vet Medicine</a>",
"<a href='https://www.ui.edu.ng/zoological-garden'>UI Zoo<a/>",
"<a href='http://uch-ibadan.org.ng/'>UCH<a/>",
"<a href='https://premierhotelibadan.com/'>Premier Hotel<a/>",
"<a href='https://en.wikipedia.org/wiki/Mapo_Hall'>Mapo Hall<a/>",
"<a href='www.polyibadan.edu.ng'>The Polytechnic Ibadan<a/>",
"<a href='https://en.wikipedia.org/wiki/Agodi_Gardens'>Agodi Gardens<a/>",
"<a href='https://www.nta.ng/tag/ibadan/page/2/'>NTA Ibadan<a/>",
"<a href='https://www.iita.org/'>IITA Ibadan<a/>")
# Get coordinates for each location
alma_mata_gps <- data.frame(
lat = c(7.4443, 7.4450, 7.4425, 7.4518,
7.4429, 7.3569, 7.4084, 7.3758,
7.4296, 7.4019, 7.3956, 7.4729),
lon = c(3.8995, 3.9000, 3.8888, 3.8944,
3.8948, 3.8743, 3.8942, 3.8970,
3.8919, 3.8993, 3.9171, 3.9152)
)
ui_logo <- makeIcon(
iconUrl = 'https://vet.ui.edu.ng/sites/default/files/UI%20LOGO%20Original%20compressed_0_0.jpg',
iconWidth = 31 * 215 / 230,
iconHeight = 31,
iconAnchorX = 31 * 215 / 230 / 2,
iconAnchorY = 16
)
trenchard_logo <- makeIcon(
iconUrl = 'https://vet.ui.edu.ng/sites/default/files/UI%20LOGO%20Original%20compressed_0_0.jpg',
iconWidth = 31 * 215 / 230,
iconHeight = 31,
iconAnchorX = 31 * 215 / 230 / 2,
iconAnchorY = 16
)
awba_logo <- makeIcon(
iconUrl = 'https://vet.ui.edu.ng/sites/default/files/UI%20LOGO%20Original%20compressed_0_0.jpg',
iconWidth = 31 * 215 / 230,
iconHeight = 31,
iconAnchorX = 31 * 215 / 230 / 2,
iconAnchorY = 16
)
vet_logo <- makeIcon(
iconUrl = 'https://vet.ui.edu.ng/sites/default/files/UI%20LOGO%20Original%20compressed_0_0.jpg',
iconWidth = 31 * 215 / 230,
iconHeight = 31,
iconAnchorX = 31 * 215 / 230 / 2,
iconAnchorY = 16
)
zoo_logo <- makeIcon(
iconUrl = 'https://vet.ui.edu.ng/sites/default/files/UI%20LOGO%20Original%20compressed_0_0.jpg',
iconWidth = 31 * 215 / 230,
iconHeight = 31,
iconAnchorX = 31 * 215 / 230 / 2,
iconAnchorY = 16
)
uch_logo <- makeIcon(
iconUrl = 'http://uch-ibadan.org.ng/wp-content/uploads/2018/02/uchnew2.png',
iconWidth = 45 * 215 / 230,
iconHeight = 45,
iconAnchorX = 45 * 215 / 230 / 2,
iconAnchorY = 16
)
premier_logo <- makeIcon(
iconUrl = 'http://www.nigeriancasinos.ng/wp-content/uploads/2014/09/logo-premier-hotel-ibadan.gif',
iconWidth = 50 * 215 / 230,
iconHeight = 50,
iconAnchorX = 50 * 215 / 230 / 2,
iconAnchorY = 16
)
mapo_logo <- makeIcon(
iconUrl = 'https://www.venuehero.co/uploads/b12693ed42e30706269844b96da2f672.jpg',
iconWidth = 31 * 215 / 230,
iconHeight = 31,
iconAnchorX = 31 * 215 / 230 / 2,
iconAnchorY = 16
)
poly_logo <- makeIcon(
iconUrl = 'http://dpp.polyibadan.edu.ng/frontend/images/logo3.png',
iconWidth = 39 * 215 / 230,
iconHeight = 39,
iconAnchorX = 31 * 215 / 230 / 2,
iconAnchorY = 16
)
agodi_logo <- makeIcon(
iconUrl = 'https://hotels.ng/guides/wp-content/uploads/2017/08/agodi5.jpg',
iconWidth = 26 * 215 / 230,
iconHeight = 26,
iconAnchorX = 26 * 215 / 230 / 2,
iconAnchorY = 16
)
nta_logo <- makeIcon(
iconUrl = 'https://www.nta.ng/wp-content/uploads/2014/08/Header-logo-NTA-transparent.png',
iconWidth = 40 * 215 / 230,
iconHeight = 40,
iconAnchorX = 40 * 215 / 230 / 2,
iconAnchorY = 16
)
iita_logo <- makeIcon(
iconUrl = 'https://www.iita.org/wp-content/themes/iita/images/IITA-TAA-smallnew.png',
iconWidth = 40 * 215 / 230,
iconHeight = 40,
iconAnchorX = 40 * 215 / 230 / 2,
iconAnchorY = 16
)
alma_mata_logo <- iconList(
ui_logo,
trenchard_logo,
awba_logo,
vet_logo,
zoo_logo,
uch_logo,
premier_logo,
mapo_logo,
poly_logo,
agodi_logo,
nta_logo,
iita_logo
)
alma_mata_gps %>%
leaflet() %>%
addTiles() %>%
addMarkers(icon = alma_mata_logo, popup = alma_mata_environs)