Learn R Programming

spatialrisk (version 0.7.3)

plot_points: Create interactive point map

Description

Creates an interactive map for a data.frame containing point coordinates, colored by a selected variable.

Usage

plot_points(df, value, lon = "lon", lat = "lat", crs = 4326, at = NULL)

Value

An interactive mapview object.

Arguments

df

A data.frame containing columns for longitude and latitude.

value

A string giving the name of the column in df to be visualized.

lon

A string with the name of the column containing longitude values. Default is "lon".

lat

A string with the name of the column containing latitude values. Default is "lat".

crs

Integer; EPSG code for the coordinate reference system. Default is 4326.

at

Optional numeric vector; breakpoints used for visualization.

Examples

Run this code
if (FALSE) {
plot_points(Groningen, value = "amount")
}

Run the code above in your browser using DataLab