library(arc2r)
library(sf)
library(dplyr)
library(ggplot2)
data("haltestelle_bahn")
data("kantonsgebiet")


head(haltestelle_bahn)
head(kantonsgebiet)


plot(st_geometry(kantonsgebiet))
plot(haltestelle_bahn, add = TRUE, col = "blue", pch = 20)
haltestelle_bahn_join <- st_join(haltestelle_bahn,kantonsgebiet)


haltestelle_bahn_join
ggplot() +
  geom_sf(data = kantonsgebiet) +
  geom_sf(data = haltestelle_bahn_join, aes(colour = NAME)) 


arc2r/book documentation built on March 5, 2021, 2:10 p.m.