This article is a part of week 2 assignment of Developing Data Project course.
The propose of this article is to create the Leaflet interactive map to locate hospitals
around Thailand ministry of public health.

Step 1 : Import prepared data in to Rstudio.

hospital <- read.csv("hospital.csv")
head(hospital)
##                              hospital      lat      lng
## 1 Thailand Ministry of public health  13.84581 100.5268
## 2                Pranangklao Hospital 13.86568 100.4814
## 3 Central Chest Institute of Thailand 13.86551 100.5130
## 4                  Nonthavej Hospital 13.85711 100.5428
## 5       Kasemrad Prachachuen Hospital 13.83353 100.5396
## 6                  Srithanya Hospital 13.84656 100.5169
##                                                                                                url
## 1                      "<a href='https://www.moph.go.th/'>Thailand Ministry of public health </a>"
## 2            "<a href='https://www.pranangklao.go.th/webpnk60/index.php'>Pranangklao Hospital</a>"
## 3                      "<a href='https://www.ccit.go.th/'>Central Chest Institute of Thailand</a>"
## 4                                  "<a href='https://www.nonthavej.co.th/'>Nonthavej Hospital</a>"
## 5 "<a href='http://www.kasemrad.co.th/Prachachuen/th/site/home'>Kasemrad Prachachuen Hospital</a>"
## 6                     "<a href='https://www.srithanya.go.th/index.php/th/'>Srithanya Hospital</a>"

Step 2 : Making Leaflet interactive map.

library(leaflet)
library(dplyr)
Icon<- makeIcon(iconUrl = "https://www.clipartmax.com/png/full/297-2978379_doctor-symbol-clipart-hospital-hospital-location-icon.png",iconWidth = 30*200/230, iconHeight = 30,iconAnchorX = 30*200/230/2
                ,iconAnchorY = 16)
map <- hospital %>%
       leaflet()%>%
       addTiles()%>%
       addMarkers(popup = hospital$url, icon = Icon)
map