# With sample data
data("sample_dataset")
data("mx_ports")
vms_cleaned <- vms_clean(sample_dataset)
# It is a good idea to subsample when testing... it takes a while on the full data!
vms_subset <- dplyr::sample_n(vms_cleaned, 1000)
with_ports <- join_ports_locations(vms_subset)
with_ports_sf <- sf::st_as_sf(with_ports, coords = c("longitude", "latitude"), crs = 4326)
data("mx_shape")
library(ggplot2)
ggplot(mx_shape) +
geom_sf(col = "gray90") +
geom_sf(data = with_ports_sf, aes(col = location)) +
facet_wrap(~location) +
theme_bw()
Run the code above in your browser using DataLab