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,
control = "default",
smooth = FALSE,
statistic = "frequency",
percentile = 90,
lon.inc = 1,
lat.inc = 1,
min.bin = 1,
.combine = NA,
sigma = 1.5,
cols = "default",
alpha = 0.5,
tile.border = NA,
provider = "OpenStreetMap"
)
data |
Data frame, the result of importing a trajectory file using
|
latitude, longitude |
The decimal latitude/longitude. |
pollutant |
Pollutant to be plotted. By default the trajectory height is used. |
control |
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 |
Colours to be used for plotting. Options include "default",
"increment", "heat", "turbo" and |
alpha |
Opacity of the tiles. Must be between |
tile.border |
Colour to use for the border of binned tiles. Defaults to
|
provider |
The base map to be used. See http://leaflet-extras.github.io/leaflet-providers/preview/ for a list of all base maps that can be used. |
A leaflet object.
the original 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.