Skip to content
Snippets Groups Projects
Commit d8e8747c authored by Tom Rushby's avatar Tom Rushby
Browse files

Update elec by LSOA map.

parent 1d9d05fe
No related branches found
No related tags found
1 merge request!3Cartograms example
......@@ -98,15 +98,15 @@ qpal <- colorQuantile("Reds", sf_data_elec$`Median domestic electricity consumpt
leaflet(sf_data_elec %>% filter(LAD11NM == "Southampton")) %>%
addTiles() %>% # Add default OpenStreetMap map tiles
addPolygons(color = ~qpal(`Median domestic electricity consumption \n(kWh per meter)`), fillOpacity = 0.8, weight = 1.5, popup = ~(LSOA11NM), # popups clicked
addPolygons(color = ~qpal(`Median domestic electricity consumption \n(kWh per meter)`), fillOpacity = 0.7, weight = 1.5, popup = ~(LSOA11NM), # popups clicked
label = ~(popup_text), # define labels
labelOptions = labelOptions( # label options
style = list("font-weight" = "normal", padding = "2px 2px"),
direction = "auto"),
highlight = highlightOptions(
weight = 5,
color = "#666",
fillOpacity = 0.7,
weight = 3,
color = "Red",
fillOpacity = 1,
bringToFront = TRUE))
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment