Polar projection in Leaflet

83 Views Asked by At

I use the code to produce a map were points of interest are inserted:

library(leaflet)
library(readxl)
library(dplyr)

    data_a <- structure(list(Nr = c(1, 2, 3, 4, 5, 6), Name = c("MD95-2006", 
"IODP 302", "IODP 302", "IODP 302", "IODP 302", "IODP 302"), 
    Lat = c(57.083333, 87.89, 87.9036, 87.92118, 87.93333, 87.86658
    ), Long = c(-8.05, 137.65, 138.46065, 139.365501, 139.535, 
    136.17735), `18O` = c(0.69, NA, NA, NA, NA, NA), Info = c(NA_character_, 
    NA_character_, NA_character_, NA_character_, NA_character_, 
    NA_character_), Source = c("MD95-2006 planktic foraminifera ?13C and ?18O", 
    "https://www.ecord.org/expedition302/", "https://www.ecord.org/expedition302/", 
    "https://www.ecord.org/expedition302/", "https://www.ecord.org/expedition302/", 
    "https://www.ecord.org/expedition302/")), row.names = c(NA, 
-6L), class = c("tbl_df", "tbl", "data.frame"))


data_b <- structure(list(Nr = c(1, 2, 3, 4, 5, 6), Name = c("Simstich", 
"Schiebel", "Schiebel", "Stangeew", "Stangeew", "Stangeew"), 
    Lat = c(75.003333, 62.50275, 67.225033, 56.2747, 53.4347, 
    52.874), Long = c(-7.313333, -13.99235, 2.920317, -48.6992, 
    -50.0673, -51.5128), `18O` = c(NA, NA, NA, NA, NA, NA), Info = c("data for different depths", 
    NA, NA, NA, NA, NA), Source = c("https://doi.pangaea.de/10.1594/PANGAEA.82001?format=html#download", 
    "https://doi.pangaea.de/10.1594/PANGAEA.75647?format=html#download", 
    "https://doi.pangaea.de/10.1594/PANGAEA.75719", "https://doi.pangaea.de/10.1594/PANGAEA.706908", 
    "https://doi.pangaea.de/10.1594/PANGAEA.706908", "https://doi.pangaea.de/10.1594/PANGAEA.706908"
    )), row.names = c(NA, -6L), class = c("tbl_df", "tbl", "data.frame"
))

data <- bind_rows(list(data_a,data_b), .id="data_source")

icons <- awesomeIcons(
  icon = 'ios-close',
  iconColor = 'black',
  library = 'ion',
  markerColor = ifelse(data$data_source == 1, "green","red")
)

map <- leaflet(data) %>%
  addTiles() %>%
  addAwesomeMarkers(lng = ~Long, lat = ~Lat, icon = icons) 

print(map)

this generates the following output:

enter image description here

as you can see, the dots in the north-east are poorly resolved spatially!how can I generate the polar projection? unfortunately I cannot find this on the page https://rstudio.github.io/leaflet/projections.html

0

There are 0 best solutions below