Description Usage Arguments Value Examples
Get Danish spatial data
1 | geo_get_spatial(spatial, quiet = TRUE)
|
spatial |
one of "Danish zip codes", "Danish regions", "Danish police districts", "Danish placenames - points", "Danish placenames - lines", "Danish placenames - areas", "Danish parishes", "Danish municipalities", "Danish jurisdictions" or "Danish constituencies" |
an object of either SpatialLinesDataFrame, SpatialPointsDataFrame or SpatialPolygonsDataFrame
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(geoDK)
library(ggplot2)
dk_regions <- geo_get_spatial("Danish regions")
dk_placenames_points <- geo_get_spatial("Danish placenames - points")
df_regions <- make_tidy_poly(dk_regions)
long_barrows <- subset(dk_placenames_points, dk_placenames_points$feat_type == "langdysse")
ggplot() +
geom_polygon(data = df_regions, aes(x = lng, y = lat, group = area), fill = "white",
color = "black", show.legend = FALSE) +
geom_point(data = tibble::as_tibble(long_barrows@coords), aes(x = coords.x1, y = coords.x2),
color = "red") +
coord_cartesian() +
theme_minimal()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.