Based on open data provided by data.iledefrance.fr, we show the locations of higher education institutions in Paris and around.
We use clustering for navigating by zooming in / zooming out, for the number of markers is quite large (more than 500). These give informations about the institutions.
library(leaflet)
univIcon <- makeIcon(
iconUrl = "univ-picto.png",
iconWidth = 40, iconHeight = 29,
iconAnchorX = 20, iconAnchorY = 16
)
geodata <- read.csv2("implantations-des-etablissements-denseignement-superieur-publics_red.csv", header = TRUE, sep = ",")
coords <- strsplit(as.character(geodata$Geolocalisation), ", ")
lat <- as.numeric(lapply(coords, function(c) {c[1]}))
lng <- as.numeric(lapply(coords, function(c) {c[2]}))
institutionsLatLong <- data.frame(lat = lat, lng = lng)
institutionsPopup <- apply(geodata, 1, function(r) {
paste("<div style='color:black; background-color: #F7F7F7; padding: 5px'>", "<b>Name:</b> ", r["Institution"], "<br/>", "<b>Type:</b> ", r["Type"], "<br/>", "<b>Description:</b> ", r["Implantation"], "<br/>", "<b>Opened:</b> ", r["Opening"], "<br/>", "<b>Students:</b> ", r["NumberOfStudents"], "<br/>", "<b>Wikidata:</b> ", "<a href='", r["Wikidata"], "' target='_blank'>", r["Wikidata"], "</a>", "</div>", sep = "")
})
institutionsLatLong %>%
leaflet() %>%
addTiles() %>%
addMarkers(clusterOptions = markerClusterOptions(), icon = univIcon, popup = institutionsPopup)
Higher education institutions