View source: R/interactive_map.R
interactive_map | R Documentation |
Produce an interactive html map.
interactive_map( ras, layer_name = NULL, palette = "inferno", transparency = 0.8, legend = TRUE, set_value_range = NULL, discrete = FALSE, scale_type = "none", outfile = NULL, surveillance_locs = NULL, pt_col = "red", cleanup = FALSE )
ras |
A |
layer_name |
Character. An optional name to assign to |
palette |
Either a vector of 2 or more colours (e.g. as hex codes or
colour names) or the name of a palette function supported by |
transparency |
Numeric. Value between 0 and 1 defining the opacity of the plotted raster data (1 = fully opaque; 0 = fully transparent). |
legend |
Logical. Should a legend be plotted? |
set_value_range |
A numeric vector giving upper and lower limits for raster values. Values outside this range (including the limits) will be set to NA. |
discrete |
Logical. Are the values of |
scale_type |
Character. Can be one of: |
outfile |
Character. If |
surveillance_locs |
A spatial object or a path to a .csv file containing columns named "Latitude" and "Longitude". |
pt_col |
Character. The plotting colour for surveillance points. |
cleanup |
Logical. If a standalone html file is created, should
accessory files be removed after the standalone file is generated? This
will be a folder created within |
To create a standalone html file, the pandoc software must be installed and available to R. If pandoc is unavailable, the html file will be accompanied by a folder of accessory files.
A html map.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.