trajMap | R Documentation |
leaflet
This function plots back trajectories on a leaflet
map. This function
requires that data are imported using the openair::importTraj()
function.
Options are provided to colour the individual trajectories (e.g., by
pollutant concentrations) or create "layer control" menus to show/hide
different layers.
trajMap(
data,
longitude = "lon",
latitude = "lat",
colour = NULL,
type = NULL,
cols = "default",
alpha = 0.5,
npoints = 12,
provider = "OpenStreetMap",
legend.position = "topright",
legend.title = NULL,
legend.title.autotext = TRUE,
control.collapsed = FALSE,
control.position = "topright",
control = NULL
)
data |
A data frame containing a HYSPLIT trajectory, perhaps accessed
with required A data frame containing HYSPLIT model outputs. If this data were not
obtained using |
latitude , longitude |
The decimal latitude/longitude. default: Column names representing the decimal latitude and longitude. |
colour |
Column to be used for colouring each trajectory. default: This column may be numeric, character, factor or date(time). This will
commonly be a pollutant concentration which has been joined (e.g., by
|
type |
A method to condition the default: Used for splitting the trajectories into different groups which can be
selected between using a "layer control" menu. Passed to
|
cols |
Colours to use for plotting. default: The colours used for plotting, passed to |
alpha |
Transparency value for trajectories. default: A value between |
npoints |
Interval at which points are placed along the trajectory paths. default: A dot is placed every |
provider |
The basemap to be used. default: A single leaflet::providers. See http://leaflet-extras.github.io/leaflet-providers/preview/ for a list of all base maps that can be used. |
legend.position |
Position of the shared legend. default: Where should the legend be placed? One of "topright", "topright",
"bottomleft" or "bottomright". Passed to the |
legend.title |
Title of the legend. default: By default, when |
legend.title.autotext |
Automatically format the title of the legend? default: When |
control.collapsed |
Show the layer control as a collapsed? default: Should the "layer control" interface be collapsed? If |
control.position |
Position of the layer control menu default: Where should the "layer control" interface be placed? One of "topleft",
"topright", "bottomleft" or "bottomright". Passed to the |
control |
Deprecated. Please use |
A leaflet object.
openair::trajPlot()
trajMapStatic()
for the static ggplot2
equivalent of trajMap()
Other interactive trajectory maps:
trajLevelMap()
## Not run:
trajMap(traj_data, colour = "pm10")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.