Created
July 26, 2020 06:01
-
-
Save pachadotdev/c6232cfd084d5bc3cb3cbb638caddac0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(highcharter) | |
mapData <- tibble( | |
country = c("PT", "IE", "GB", "IS", | |
"NO", "SE", "DK", "DE", "NL", "BE", "LU", "ES", "FR", "PL", "CZ", "AT", | |
"CH", "LI", "SK", "HU", "SI", "IT", "SM", "HR", "BA", "YF", "ME", "AL", "MK", | |
"FI", "EE", "LV", "LT", "BY", "UA", "MD", "RO", "BG", "GR", "TR", "CY", | |
"RU"), | |
value = c(rep(1,4), rep(2,25), rep(3,12), 4)) | |
hcmap(map = "custom/europe", data = as.data.frame(mapData), | |
joinBy = c("iso-a2","country"), value = "value") %>% | |
hc_colorAxis(dataClassColor="category", | |
dataClasses = list(list(from=1, to=1, color="#7cb5ec", name="UTC"), | |
list(from=2, to=2, color="#434348", name="UTC+1"), | |
list(from=3, to=3, color="#90ed7d", name="UTC+2"), | |
list(from=4, to=4, color="#f7a35c", name="UTC+3"))) %>% | |
hc_exporting(enabled = T) %>% | |
hc_title(text = "Europe Time Zones") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment