Good Morning R Community
As mentioned in my previous query, I am very new to R.
I currently have a choropleth map created using leaflet which has labels for each Local Authority Area. At the moment, the label displays the name and the mean rank for the authority (from the same dataframe). I want to add in an additional column from said dataframe, which contains a URL for a web page containing additional information pertaining to each Local Authority (32 Local Authorities, each with their own individual page).
I can get the url to display, but not as a clickable hyperlink. Each time I try to add the html tags in as per the guidance on https://rstudio.github.io/leaflet/popups.html, I get various "object n not found" errors on execution.
The map showing the labels as they stand can be found here:
https://rpubs.com/hibsgirl42/609494
Here is my code snippet for the label in question. The field containing the URL is project_2004$councilProfile
addPolygons(data = project_2004, # sixth group
fillColor = ~pal(meanSIMDrank6),
weight = 2,
opacity = 1,
color = "white",
dashArray = "3",
fillOpacity = 0.7,
highlight = highlightOptions(
weight = 2,
color = "#666",
dashArray = "",
fillOpacity = 0.7,
bringToFront = TRUE),
group = "SIMD2004",
label=~paste(project_2004$lad17nm,
round(project_2004$meanSIMDrank6),
project_2004$councilProfile),
labelOptions = labelOptions(textsize = "12px",
direction = "auto")) %>%
Not sure whether I have got this completely wrong / should be using a pop-up instead? Any help would be very much appreciated.
Thanks in advance