26 lines
1.3 KiB
R
26 lines
1.3 KiB
R
bins <- c(0, quantile(df$vonattav,probs=c(0.02,0.05,0.1,0.25,0.35,0.5,0.75,0.9)), Inf) # Kvintilisek
|
|
pal <- colorBin("YlOrRd", domain = df$vonattav, bins = bins)
|
|
|
|
leaflet(df) |>
|
|
addTiles() |>
|
|
addCircles(~lon,~lat,popup = paste0(df$cim,"<br>",round(df$metrotav,2)," m"),radius = 80,fillColor = ~pal(vonattav),fillOpacity = 0.8,stroke = F) |>
|
|
addLegend(pal = pal, values = df$vonattav, title = "Távolság a vonattól",
|
|
position = "bottomright") |>
|
|
addMarkers(vonat$lon, vonat$lat,popup = vonat$name)
|
|
|
|
leaflet(df) |>
|
|
addTiles() |>
|
|
addCircles(~lon,~lat,popup = paste0(df$cim,"<br>",round(df$metrotav,2)," m"),radius = 80,fillColor = ~pal(metrotav),fillOpacity = 0.8,stroke = F) |>
|
|
addLegend(pal = pal, values = df$metrotav, title = "Távolság a metrótól",
|
|
position = "bottomright") |>
|
|
addMarkers(metro$lon, metro$lat,popup = metro$name)
|
|
|
|
leaflet(df) |>
|
|
addTiles() |>
|
|
addCircles(~lon,~lat,popup = paste0(df$cim,"<br>",round(df$tomkoz,2)," m"),radius = 100,fillColor = ~pal(tomkoz),fillOpacity = 0.8,stroke = F) |>
|
|
addLegend(pal = pal, values = df$tomkoz, title = "Távolság a legközelebbi <br> metrótól vagy vonattól",
|
|
position = "bottomright") |>
|
|
addMarkers(metro$lon, metro$lat,popup = metro$name) |>
|
|
addMarkers(vonat$lon, vonat$lat,popup = vonat$name)
|
|
|