Learn R Programming

mapDK (version 0.3.0)

pointDK: Plot points on map of Denmark

Description

Plot points on map of Denmark

Usage

pointDK(data, lon = "lon", lat = "lat", values = NULL, detail = "municipal", show_missing = TRUE, sub = NULL, aesthetic = "both", sub.plot = NULL, guide.label = NULL, map.title = NULL, map.fill = "gray92", map.colour = "black", point.colour = "black", ...)

Arguments

data
A data frame of points
lon, lat
String variables specifying names of longitude and latitude columns in the dataset
values
Does the data set contain values?
sub
A vector of strings specifying subregions to be plotted
aesthetic
Do you want to plot your values using colour and/or size?
guide.label
A string with custom label name
map.title
A string with map title

Value

A ggplot class object

See Also

https://github.com/sebastianbarfort/mapDK

Examples

Run this code

pointDK(benches, sub = "koebenhavn", point.colour = "red")
# plot values
benches$mydata = 1:nrow(benches)
pointDK(benches, values = "mydata", detail = "polling", sub.plot = "koebenhavn", point.colour = "red",
       aesthetic = "colour")

Run the code above in your browser using DataLab