View source: R/traj_trajLevelMap.R
trajLevelMap | R Documentation |
leaflet
This function plots back trajectories on a leaflet
map. This function
requires that data are imported using the openair::importTraj()
function.
trajLevelMap(
data,
longitude = "lon",
latitude = "lat",
pollutant,
type = NULL,
smooth = FALSE,
statistic = "frequency",
percentile = 90,
lon.inc = 1,
lat.inc = 1,
min.bin = 1,
.combine = NA,
sigma = 1.5,
cols = "turbo",
alpha = 0.5,
tile.border = NA,
provider = "OpenStreetMap",
legend.position = "topright",
legend.title = NULL,
legend.title.autotext = TRUE,
control.collapsed = FALSE,
control.position = "topright"
)
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. |
pollutant |
Pollutant to be plotted. By default the trajectory height is used. |
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
|
smooth |
Should the trajectory surface be smoothed? Defaults to |
statistic |
Statistic to use for There are also various ways of plotting concentrations. It is possible to set If If If |
percentile |
The percentile concentration of |
lon.inc , lat.inc |
The longitude and latitude intervals to be used for binning data. |
min.bin |
The minimum number of unique points in a grid cell. Counts
below |
.combine |
When statistic is "SQTBA" it is possible to combine lots of
receptor locations to derive a single map. |
sigma |
For the SQTBA approach |
cols |
The colours used for plotting, passed to
|
alpha |
Opacity of the tiles. Must be between |
tile.border |
Colour to use for the border of binned tiles. Defaults to
|
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 |
A leaflet object.
openair::trajLevel()
trajLevelMapStatic()
for the static ggplot2
equivalent of
trajLevelMap()
Other interactive trajectory maps:
trajMap()
## Not run:
trajLevelMap(traj_data, pollutant = "pm2.5", statistic = "pscf", min.bin = 10)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.