From a677feda8dd76fbdd9473779fb983480727cf80a Mon Sep 17 00:00:00 2001 From: dcooley Date: Tue, 16 Jan 2024 08:02:41 +1100 Subject: [PATCH 1/5] docs --- man/add_arc.Rd | 15 +----- man/add_column.Rd | 22 ++------- man/add_geojson.Rd | 19 +------- man/add_greatcircle.Rd | 26 ++++------ man/add_grid.Rd | 15 +----- man/add_heatmap.Rd | 11 +---- man/add_hexagon.Rd | 14 +----- man/add_line.Rd | 19 ++------ man/add_path.Rd | 20 ++------ man/add_pointcloud.Rd | 21 ++------ man/add_polygon.Rd | 21 ++------ man/add_scatterplot.Rd | 22 ++------- man/add_screengrid.Rd | 17 ++----- man/add_text.Rd | 23 ++------- man/add_trips.Rd | 18 ++----- man/clear.Rd | 107 +++++++++++------------------------------ 16 files changed, 84 insertions(+), 306 deletions(-) diff --git a/man/add_arc.Rd b/man/add_arc.Rd index 68bf907c..41a48185 100644 --- a/man/add_arc.Rd +++ b/man/add_arc.Rd @@ -4,17 +4,6 @@ \alias{add_arc} \title{Add arc} \usage{ -<<<<<<< HEAD -add_arc(map, data = get_map_data(map), layer_id = NULL, origin, - destination, id = NULL, stroke_from = NULL, - stroke_from_opacity = NULL, stroke_to = NULL, - stroke_to_opacity = NULL, stroke_width = NULL, tilt = NULL, - height = NULL, tooltip = NULL, auto_highlight = FALSE, - highlight_colour = "#AAFFFFFF", legend = F, legend_options = NULL, - legend_format = NULL, palette = "viridis", na_colour = "#808080FF", - update_view = TRUE, focus_layer = FALSE, transitions = NULL, - digits = 6, brush_radius = NULL, ...) -======= add_arc( map, data = get_map_data(map), @@ -41,9 +30,9 @@ add_arc( focus_layer = FALSE, transitions = NULL, digits = 6, - brush_radius = NULL + brush_radius = NULL, + ... ) ->>>>>>> origin } \arguments{ \item{map}{a mapdeck map object} diff --git a/man/add_column.Rd b/man/add_column.Rd index fdc2cead..4f09bd1d 100644 --- a/man/add_column.Rd +++ b/man/add_column.Rd @@ -4,18 +4,6 @@ \alias{add_column} \title{Add column} \usage{ -<<<<<<< HEAD -add_column(map, data = get_map_data(map), polyline = NULL, - lon = NULL, lat = NULL, fill_colour = NULL, fill_opacity = NULL, - stroke_colour = NULL, stroke_opacity = NULL, stroke_width = NULL, - radius = 1000, elevation = NULL, elevation_scale = 1, - coverage = 1, angle = 0, disk_resolution = 20, tooltip = NULL, - auto_highlight = FALSE, highlight_colour = "#AAFFFFFF", - layer_id = NULL, id = NULL, palette = "viridis", - na_colour = "#808080FF", legend = FALSE, legend_options = NULL, - legend_format = NULL, update_view = TRUE, focus_layer = FALSE, - digits = 6, transitions = NULL, brush_radius = NULL, ...) -======= add_column( map, data = get_map_data(map), @@ -47,9 +35,9 @@ add_column( focus_layer = FALSE, digits = 6, transitions = NULL, - brush_radius = NULL + brush_radius = NULL, + ... ) ->>>>>>> origin } \arguments{ \item{map}{a mapdeck map object} @@ -133,13 +121,11 @@ a named list indicating which colour attributes should be included in the legend \item{transitions}{list specifying the duration of transitions.} -<<<<<<< HEAD -\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} -======= \item{brush_radius}{radius of the brush in metres. Default NULL. If supplied, the arcs will only show if the origin or destination are within the radius of the mouse. If NULL, all arcs are displayed} ->>>>>>> origin + +\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} } \description{ The ColumnLayer can be used to render a heatmap of vertical cylinders. It renders diff --git a/man/add_geojson.Rd b/man/add_geojson.Rd index 2183c2df..31e9890d 100644 --- a/man/add_geojson.Rd +++ b/man/add_geojson.Rd @@ -4,21 +4,6 @@ \alias{add_geojson} \title{Add Geojson} \usage{ -<<<<<<< HEAD -add_geojson(map, data = get_map_data(map), layer_id = NULL, - stroke_colour = NULL, stroke_opacity = NULL, stroke_width = NULL, - dash_size = NULL, dash_gap = NULL, fill_colour = NULL, - fill_opacity = NULL, radius = NULL, elevation = NULL, - extruded = FALSE, light_settings = list(), legend = F, - legend_options = NULL, legend_format = NULL, - auto_highlight = FALSE, tooltip = NULL, - highlight_colour = "#AAFFFFFF", palette = "viridis", - na_colour = "#808080FF", line_width_units = c("metres", "pixels"), - line_width_scale = 1, line_width_min_pixels = 0, - elevation_scale = 1, point_radius_scale = 1, - point_radius_min_pixels = 1, update_view = TRUE, - focus_layer = FALSE, digits = 6, transitions = NULL, ...) -======= add_geojson( map, data = get_map_data(map), @@ -51,9 +36,9 @@ add_geojson( update_view = TRUE, focus_layer = FALSE, digits = 6, - transitions = NULL + transitions = NULL, + ... ) ->>>>>>> origin } \arguments{ \item{map}{a mapdeck map object} diff --git a/man/add_greatcircle.Rd b/man/add_greatcircle.Rd index f80bccb6..1e763c4c 100644 --- a/man/add_greatcircle.Rd +++ b/man/add_greatcircle.Rd @@ -4,17 +4,6 @@ \alias{add_greatcircle} \title{Add greatcircle} \usage{ -<<<<<<< HEAD -add_greatcircle(map, data = get_map_data(map), layer_id = NULL, origin, - destination, id = NULL, stroke_from = NULL, - stroke_from_opacity = NULL, stroke_to = NULL, - stroke_to_opacity = NULL, stroke_width = NULL, - wrap_longitude = FALSE, tooltip = NULL, auto_highlight = FALSE, - highlight_colour = "#AAFFFFFF", legend = F, legend_options = NULL, - legend_format = NULL, palette = "viridis", na_colour = "#808080FF", - update_view = TRUE, focus_layer = FALSE, transitions = NULL, - digits = 6, ...) -======= add_greatcircle( map, data = get_map_data(map), @@ -39,9 +28,10 @@ add_greatcircle( update_view = TRUE, focus_layer = FALSE, transitions = NULL, - digits = 6 + digits = 6, + brush_radius = NULL, + ... ) ->>>>>>> origin } \arguments{ \item{map}{a mapdeck map object} @@ -109,11 +99,13 @@ palette for different colour options (where available), \item{transitions}{list specifying the duration of transitions.} -<<<<<<< HEAD -\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} -======= \item{digits}{number of digits for rounding coordinates} ->>>>>>> origin + +\item{brush_radius}{radius of the brush in metres. Default NULL. If supplied, +the arcs will only show if the origin or destination are within the radius of the mouse. +If NULL, all arcs are displayed} + +\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} } \description{ Renders flat arcs along the great circle joining pairs diff --git a/man/add_grid.Rd b/man/add_grid.Rd index 055371a4..06be33be 100644 --- a/man/add_grid.Rd +++ b/man/add_grid.Rd @@ -4,17 +4,6 @@ \alias{add_grid} \title{Add Grid} \usage{ -<<<<<<< HEAD -add_grid(map, data = get_map_data(map), lon = NULL, lat = NULL, - polyline = NULL, cell_size = 1000, extruded = TRUE, - elevation = NULL, elevation_function = c("sum", "mean", "min", - "max"), colour = NULL, colour_function = c("sum", "mean", "min", - "max"), elevation_scale = 1, colour_range = NULL, legend = FALSE, - legend_options = NULL, auto_highlight = FALSE, - highlight_colour = "#AAFFFFFF", layer_id = NULL, - update_view = TRUE, focus_layer = FALSE, digits = 6, - transitions = NULL, brush_radius = NULL, ...) -======= add_grid( map, data = get_map_data(map), @@ -38,9 +27,9 @@ add_grid( focus_layer = FALSE, digits = 6, transitions = NULL, - brush_radius = NULL + brush_radius = NULL, + ... ) ->>>>>>> origin } \arguments{ \item{map}{a mapdeck map object} diff --git a/man/add_heatmap.Rd b/man/add_heatmap.Rd index 179d5c30..f5d21948 100644 --- a/man/add_heatmap.Rd +++ b/man/add_heatmap.Rd @@ -4,13 +4,6 @@ \alias{add_heatmap} \title{Add Heatmap} \usage{ -<<<<<<< HEAD -add_heatmap(map, data = get_map_data(map), lon = NULL, lat = NULL, - polyline = NULL, weight = NULL, colour_range = NULL, - radius_pixels = 30, intensity = 1, threshold = 0.05, - layer_id = NULL, update_view = TRUE, focus_layer = FALSE, - digits = 6, transitions = NULL, ...) -======= add_heatmap( map, data = get_map_data(map), @@ -26,9 +19,9 @@ add_heatmap( update_view = TRUE, focus_layer = FALSE, digits = 6, - transitions = NULL + transitions = NULL, + ... ) ->>>>>>> origin } \arguments{ \item{map}{a mapdeck map object} diff --git a/man/add_hexagon.Rd b/man/add_hexagon.Rd index 9251872a..19c98907 100644 --- a/man/add_hexagon.Rd +++ b/man/add_hexagon.Rd @@ -4,16 +4,6 @@ \alias{add_hexagon} \title{Add hexagon} \usage{ -<<<<<<< HEAD -add_hexagon(map, data = get_map_data(map), polyline = NULL, - lon = NULL, lat = NULL, layer_id = NULL, radius = 1000, - elevation = NULL, elevation_function = c("sum", "mean", "min", - "max"), colour = NULL, colour_function = c("sum", "mean", "min", - "max"), legend = FALSE, legend_options = NULL, elevation_scale = 1, - auto_highlight = FALSE, highlight_colour = "#AAFFFFFF", - colour_range = NULL, update_view = TRUE, focus_layer = FALSE, - digits = 6, transitions = NULL, brush_radius = NULL, ...) -======= add_hexagon( map, data = get_map_data(map), @@ -36,9 +26,9 @@ add_hexagon( focus_layer = FALSE, digits = 6, transitions = NULL, - brush_radius = NULL + brush_radius = NULL, + ... ) ->>>>>>> origin } \arguments{ \item{map}{a mapdeck map object} diff --git a/man/add_line.Rd b/man/add_line.Rd index 3564caa7..a256e2b9 100644 --- a/man/add_line.Rd +++ b/man/add_line.Rd @@ -4,15 +4,6 @@ \alias{add_line} \title{Add line} \usage{ -<<<<<<< HEAD -add_line(map, data = get_map_data(map), layer_id = NULL, origin, - destination, id = NULL, stroke_colour = NULL, stroke_width = NULL, - stroke_opacity = NULL, tooltip = NULL, auto_highlight = FALSE, - highlight_colour = "#AAFFFFFF", palette = "viridis", - na_colour = "#808080FF", legend = FALSE, legend_options = NULL, - legend_format = NULL, update_view = TRUE, focus_layer = FALSE, - digits = 6, transitions = NULL, ...) -======= add_line( map, data = get_map_data(map), @@ -35,9 +26,9 @@ add_line( focus_layer = FALSE, digits = 6, transitions = NULL, - brush_radius = NULL + brush_radius = NULL, + ... ) ->>>>>>> origin } \arguments{ \item{map}{a mapdeck map object} @@ -95,13 +86,11 @@ a named list indicating which colour attributes should be included in the legend \item{transitions}{list specifying the duration of transitions.} -<<<<<<< HEAD -\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} -======= \item{brush_radius}{radius of the brush in metres. Default NULL. If supplied, the arcs will only show if the origin or destination are within the radius of the mouse. If NULL, all arcs are displayed} ->>>>>>> origin + +\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} } \description{ The Line Layer renders raised lines joining pairs of source and target coordinates diff --git a/man/add_path.Rd b/man/add_path.Rd index 39a25fb8..179332f2 100644 --- a/man/add_path.Rd +++ b/man/add_path.Rd @@ -4,16 +4,6 @@ \alias{add_path} \title{Add Path} \usage{ -<<<<<<< HEAD -add_path(map, data = get_map_data(map), polyline = NULL, - stroke_colour = NULL, stroke_width = NULL, stroke_opacity = NULL, - dash_size = NULL, dash_gap = NULL, tooltip = NULL, - billboard = FALSE, layer_id = NULL, id = NULL, - auto_highlight = FALSE, highlight_colour = "#AAFFFFFF", - palette = "viridis", na_colour = "#808080FF", legend = FALSE, - legend_options = NULL, legend_format = NULL, update_view = TRUE, - focus_layer = FALSE, digits = 6, transitions = NULL, ...) -======= add_path( map, data = get_map_data(map), @@ -43,9 +33,9 @@ add_path( focus_layer = FALSE, digits = 6, transitions = NULL, - brush_radius = NULL + brush_radius = NULL, + ... ) ->>>>>>> origin } \arguments{ \item{map}{a mapdeck map object} @@ -124,13 +114,11 @@ a named list indicating which colour attributes should be included in the legend \item{transitions}{list specifying the duration of transitions.} -<<<<<<< HEAD -\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} -======= \item{brush_radius}{radius of the brush in metres. Default NULL. If supplied, the arcs will only show if the origin or destination are within the radius of the mouse. If NULL, all arcs are displayed} ->>>>>>> origin + +\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} } \description{ The Path Layer takes in lists of coordinate points and renders them as diff --git a/man/add_pointcloud.Rd b/man/add_pointcloud.Rd index edcd7b6d..1560330a 100644 --- a/man/add_pointcloud.Rd +++ b/man/add_pointcloud.Rd @@ -4,17 +4,6 @@ \alias{add_pointcloud} \title{Add Pointcloud} \usage{ -<<<<<<< HEAD -add_pointcloud(map, data = get_map_data(map), lon = NULL, lat = NULL, - elevation = NULL, polyline = NULL, radius = 10, - fill_colour = NULL, fill_opacity = NULL, tooltip = NULL, - auto_highlight = FALSE, highlight_colour = "#AAFFFFFF", - light_settings = list(), layer_id = NULL, id = NULL, - palette = "viridis", na_colour = "#808080FF", legend = FALSE, - legend_options = NULL, legend_format = NULL, update_view = TRUE, - focus_layer = FALSE, digits = 6, transitions = NULL, - brush_radius = NULL, ...) -======= add_pointcloud( map, data = get_map_data(map), @@ -40,9 +29,9 @@ add_pointcloud( focus_layer = FALSE, digits = 6, transitions = NULL, - brush_radius = NULL + brush_radius = NULL, + ... ) ->>>>>>> origin } \arguments{ \item{map}{a mapdeck map object} @@ -105,13 +94,11 @@ a named list indicating which colour attributes should be included in the legend \item{transitions}{list specifying the duration of transitions.} -<<<<<<< HEAD -\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} -======= \item{brush_radius}{radius of the brush in metres. Default NULL. If supplied, the arcs will only show if the origin or destination are within the radius of the mouse. If NULL, all arcs are displayed} ->>>>>>> origin + +\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} } \description{ The Pointcloud Layer takes in coordinate points and renders them as circles diff --git a/man/add_polygon.Rd b/man/add_polygon.Rd index 0be737f3..bf53073f 100644 --- a/man/add_polygon.Rd +++ b/man/add_polygon.Rd @@ -4,17 +4,6 @@ \alias{add_polygon} \title{Add Polygon} \usage{ -<<<<<<< HEAD -add_polygon(map, data = get_map_data(map), polyline = NULL, - stroke_colour = NULL, stroke_width = NULL, stroke_opacity = NULL, - fill_colour = NULL, fill_opacity = NULL, elevation = NULL, - tooltip = NULL, auto_highlight = FALSE, elevation_scale = 1, - highlight_colour = "#AAFFFFFF", light_settings = list(), - layer_id = NULL, id = NULL, palette = "viridis", - na_colour = "#808080FF", legend = FALSE, legend_options = NULL, - legend_format = NULL, update_view = TRUE, focus_layer = FALSE, - digits = 6, transitions = NULL, ...) -======= add_polygon( map, data = get_map_data(map), @@ -41,9 +30,9 @@ add_polygon( focus_layer = FALSE, digits = 6, transitions = NULL, - brush_radius = NULL + brush_radius = NULL, + ... ) ->>>>>>> origin } \arguments{ \item{map}{a mapdeck map object} @@ -114,13 +103,11 @@ a named list indicating which colour attributes should be included in the legend \item{transitions}{list specifying the duration of transitions.} -<<<<<<< HEAD -\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} -======= \item{brush_radius}{radius of the brush in metres. Default NULL. If supplied, the arcs will only show if the origin or destination are within the radius of the mouse. If NULL, all arcs are displayed} ->>>>>>> origin + +\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} } \description{ The Polygon Layer renders filled and/or stroked polygons. diff --git a/man/add_scatterplot.Rd b/man/add_scatterplot.Rd index 8e9cc6bf..8b057703 100644 --- a/man/add_scatterplot.Rd +++ b/man/add_scatterplot.Rd @@ -4,18 +4,6 @@ \alias{add_scatterplot} \title{Add Scatterplot} \usage{ -<<<<<<< HEAD -add_scatterplot(map, data = get_map_data(map), lon = NULL, - lat = NULL, polyline = NULL, radius = NULL, - radius_min_pixels = 1, radius_max_pixels = NULL, - fill_colour = NULL, fill_opacity = NULL, stroke_colour = NULL, - stroke_width = NULL, stroke_opacity = NULL, tooltip = NULL, - auto_highlight = FALSE, highlight_colour = "#AAFFFFFF", - layer_id = NULL, id = NULL, palette = "viridis", - na_colour = "#808080FF", legend = FALSE, legend_options = NULL, - legend_format = NULL, digits = 6, update_view = TRUE, - focus_layer = FALSE, transitions = NULL, brush_radius = NULL, ...) -======= add_scatterplot( map, data = get_map_data(map), @@ -45,9 +33,9 @@ add_scatterplot( focus_layer = FALSE, transitions = NULL, brush_radius = NULL, - collision_filter = FALSE + collision_filter = FALSE, + ... ) ->>>>>>> origin } \arguments{ \item{map}{a mapdeck map object} @@ -124,13 +112,11 @@ a named list indicating which colour attributes should be included in the legend \item{transitions}{list specifying the duration of transitions.} -<<<<<<< HEAD -\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} -======= \item{brush_radius}{radius of the brush in metres. Default NULL. If supplied, the arcs will only show if the origin or destination are within the radius of the mouse. If NULL, all arcs are displayed} ->>>>>>> origin + +\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} } \description{ The Scatterplot Layer takes in coordinate points and renders them as circles diff --git a/man/add_screengrid.Rd b/man/add_screengrid.Rd index f6b4b801..2e3bf244 100644 --- a/man/add_screengrid.Rd +++ b/man/add_screengrid.Rd @@ -4,13 +4,6 @@ \alias{add_screengrid} \title{Add Screengrid} \usage{ -<<<<<<< HEAD -add_screengrid(map, data = get_map_data(map), lon = NULL, lat = NULL, - polyline = NULL, weight = NULL, aggregation = c("sum", "mean", - "min", "max"), colour_range = NULL, opacity = 0.8, cell_size = 50, - layer_id = NULL, update_view = TRUE, focus_layer = FALSE, - digits = 6, ...) -======= add_screengrid( map, data = get_map_data(map), @@ -25,9 +18,9 @@ add_screengrid( layer_id = NULL, update_view = TRUE, focus_layer = FALSE, - digits = 6 + digits = 6, + ... ) ->>>>>>> origin } \arguments{ \item{map}{a mapdeck map object} @@ -60,11 +53,9 @@ to conflict and not plot correctly} \item{focus_layer}{logical indicating if the map should update the bounds to only include this layer} -<<<<<<< HEAD -\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} -======= \item{digits}{number of digits for rounding coordinates} ->>>>>>> origin + +\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} } \description{ The Screen Grid Layer takes in an array of latitude and longitude coordinated points, diff --git a/man/add_text.Rd b/man/add_text.Rd index 7cf17021..89afb699 100644 --- a/man/add_text.Rd +++ b/man/add_text.Rd @@ -4,19 +4,6 @@ \alias{add_text} \title{Add Text} \usage{ -<<<<<<< HEAD -add_text(map, data = get_map_data(map), text, lon = NULL, lat = NULL, - polyline = NULL, fill_colour = NULL, fill_opacity = NULL, - size = NULL, angle = NULL, anchor = NULL, - alignment_baseline = NULL, billboard = TRUE, - font_family = "Monaco, monospace", font_weight = "normal", - tooltip = NULL, layer_id = NULL, id = NULL, - auto_highlight = FALSE, highlight_colour = "#AAFFFFFF", - palette = "viridis", na_colour = "#808080FF", legend = FALSE, - legend_options = NULL, legend_format = NULL, update_view = TRUE, - focus_layer = FALSE, digits = 6, transitions = NULL, - brush_radius = NULL, ...) -======= add_text( map, data = get_map_data(map), @@ -48,9 +35,9 @@ add_text( digits = 6, transitions = NULL, brush_radius = NULL, - collision_filter = FALSE + collision_filter = FALSE, + ... ) ->>>>>>> origin } \arguments{ \item{map}{a mapdeck map object} @@ -129,13 +116,11 @@ a named list indicating which colour attributes should be included in the legend \item{transitions}{list specifying the duration of transitions.} -<<<<<<< HEAD -\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} -======= \item{brush_radius}{radius of the brush in metres. Default NULL. If supplied, the arcs will only show if the origin or destination are within the radius of the mouse. If NULL, all arcs are displayed} ->>>>>>> origin + +\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} } \description{ The Text Layer renders text labels on the map diff --git a/man/add_trips.Rd b/man/add_trips.Rd index d6188d8f..557b2030 100644 --- a/man/add_trips.Rd +++ b/man/add_trips.Rd @@ -4,14 +4,6 @@ \alias{add_trips} \title{Add Trips} \usage{ -<<<<<<< HEAD -add_trips(map, data = get_map_data(map), stroke_colour = NULL, - stroke_width = NULL, opacity = 0.3, palette = "viridis", - trail_length = 180, start_time = get_m_range_start(data), - end_time = get_m_range_end(data), animation_speed = 30, - layer_id = NULL, legend = FALSE, legend_options = NULL, - legend_format = NULL, digits = 6, ...) -======= add_trips( map, data = get_map_data(map), @@ -33,9 +25,9 @@ add_trips( legend_format = NULL, update_view = TRUE, focus_layer = FALSE, - digits = 6 + digits = 6, + ... ) ->>>>>>> origin } \arguments{ \item{map}{a mapdeck map object} @@ -86,15 +78,13 @@ a named list indicating which colour attributes should be included in the legend \item{legend_format}{A list containing functions to apply to legend values. See section legend} -<<<<<<< HEAD -\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} -======= \item{update_view}{logical indicating if the map should update the bounds to include this layer} \item{focus_layer}{logical indicating if the map should update the bounds to only include this layer} \item{digits}{number of digits for rounding coordinates} ->>>>>>> origin + +\item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} } \description{ The Trips Layer takes an sf object with Z (elevation) and M (time) attributes and renders diff --git a/man/clear.Rd b/man/clear.Rd index a13d55e7..34063f6a 100644 --- a/man/clear.Rd +++ b/man/clear.Rd @@ -31,117 +31,68 @@ \alias{clear_trips} \title{Clear Animated Arc} \usage{ -<<<<<<< HEAD -clear_arc(map, layer_id = NULL, clear_legend = TRUE, - clear_view = TRUE) -======= clear_animated_arc(map, layer_id = NULL, update_view = TRUE) ->>>>>>> origin -clear_line(map, layer_id = NULL, update_view = TRUE) +clear_line(map, layer_id = NULL, update_view = TRUE, clear_legend = TRUE) -<<<<<<< HEAD -clear_column(map, layer_id = NULL, clear_legend = TRUE, - clear_view = TRUE) - -clear_geojson(map, layer_id = NULL, clear_legend = TRUE, - clear_view = TRUE) - -clear_greatcircle(map, layer_id = NULL, clear_legend = TRUE, - clear_view = TRUE) - -clear_grid(map, layer_id = NULL, clear_legend = TRUE, - clear_view = TRUE) - -clear_heatmap(map, layer_id = NULL, clear_legend = TRUE, - clear_view = TRUE) - -clear_hexagon(map, layer_id = NULL, clear_legend = TRUE, - clear_view = TRUE) - -clear_line(map, layer_id = NULL, clear_legend = TRUE, - clear_view = TRUE) - -clear_mesh(map, layer_id = NULL, clear_legend = TRUE, - clear_view = TRUE) - -clear_path(map, layer_id = NULL, clear_legend = TRUE, - clear_view = TRUE) - -clear_pointcloud(map, layer_id = NULL, clear_legend = TRUE, - clear_view = TRUE) - -clear_polygon(map, layer_id = NULL, clear_legend = TRUE, - clear_view = TRUE) - -clear_scatterplot(map, layer_id = NULL, clear_legend = TRUE, - clear_view = TRUE) - -clear_screengrid(map, layer_id = NULL, clear_legend = TRUE, - clear_view = TRUE) - -clear_text(map, layer_id = NULL, clear_legend = TRUE, - clear_view = TRUE) - -clear_title(map, layer_id = NULL) - -clear_trips(map, layer_id = NULL, clear_legend = TRUE, - clear_view = TRUE) -======= -clear_arc(map, layer_id = NULL, update_view = TRUE) +clear_arc(map, layer_id = NULL, update_view = TRUE, clear_legend = TRUE) clear_bitmap(map, layer_id = NULL, update_view = TRUE) -clear_column(map, layer_id = NULL, update_view = TRUE) +clear_column(map, layer_id = NULL, update_view = TRUE, clear_legend = TRUE) -clear_geojson(map, layer_id = NULL, update_view = TRUE) +clear_geojson(map, layer_id = NULL, update_view = TRUE, clear_legend = TRUE) -clear_greatcircle(map, layer_id = NULL, update_view = TRUE) +clear_greatcircle( + map, + layer_id = NULL, + update_view = TRUE, + clear_legend = TRUE +) -clear_grid(map, layer_id = NULL, update_view = TRUE) +clear_grid(map, layer_id = NULL, update_view = TRUE, clear_legend = TRUE) clear_h3_hexagon(map, layer_id = NULL) -clear_heatmap(map, layer_id = NULL, update_view = TRUE) +clear_heatmap(map, layer_id = NULL, update_view = TRUE, clear_legend = TRUE) -clear_hexagon(map, layer_id = NULL, update_view = TRUE) +clear_hexagon(map, layer_id = NULL, update_view = TRUE, clear_legend = TRUE) -clear_line(map, layer_id = NULL, update_view = TRUE) +clear_line(map, layer_id = NULL, update_view = TRUE, clear_legend = TRUE) -clear_mesh(map, layer_id = NULL, update_view = TRUE) +clear_mesh(map, layer_id = NULL, update_view = TRUE, clear_legend = TRUE) -clear_path(map, layer_id = NULL, update_view = TRUE) +clear_path(map, layer_id = NULL, update_view = TRUE, clear_legend = TRUE) -clear_pointcloud(map, layer_id = NULL, update_view = TRUE) +clear_pointcloud(map, layer_id = NULL, update_view = TRUE, clear_legend = TRUE) -clear_polygon(map, layer_id = NULL, update_view = TRUE) +clear_polygon(map, layer_id = NULL, update_view = TRUE, clear_legend = TRUE) -clear_scatterplot(map, layer_id = NULL, update_view = TRUE) +clear_scatterplot( + map, + layer_id = NULL, + update_view = TRUE, + clear_legend = TRUE +) -clear_screengrid(map, layer_id = NULL, update_view = TRUE) +clear_screengrid(map, layer_id = NULL, update_view = TRUE, clear_legend = TRUE) clear_terrain(map, layer_id = NULL, update_view = TRUE) -clear_text(map, layer_id = NULL, update_view = TRUE) +clear_text(map, layer_id = NULL, update_view = TRUE, clear_legend = TRUE) clear_title(map, layer_id = NULL) -clear_trips(map, layer_id = NULL, update_view = TRUE) ->>>>>>> origin +clear_trips(map, layer_id = NULL, update_view = TRUE, clear_legend = TRUE) } \arguments{ \item{map}{a mapdeck map object} \item{layer_id}{the layer_id of the layer you want to clear} -<<<<<<< HEAD -\item{clear_legend}{logical indicating if the legend should be removed} - -\item{clear_view}{logical indicating if the view should update (TRUE) or not (FALSE) -when the data is cleared} -======= \item{update_view}{logical indicating if the map should update the bounds after removing the layer} ->>>>>>> origin + +\item{clear_legend}{logical indicating if the legend should be removed} } \description{ Clears elements from a map From bc8f7ca23305785cce9db3b5b5c49ecdda168d72 Mon Sep 17 00:00:00 2001 From: dcooley Date: Fri, 19 Jan 2024 08:59:32 +1100 Subject: [PATCH 2/5] h3 legend --- R/map_layer_h3.R | 10 +++------- src/point.cpp | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/R/map_layer_h3.R b/R/map_layer_h3.R index b5a92501..c2a30920 100644 --- a/R/map_layer_h3.R +++ b/R/map_layer_h3.R @@ -102,7 +102,6 @@ add_h3 <- function( legend_format = NULL, update_view = TRUE, focus_layer = FALSE, - digits = 6, transitions = NULL ) { @@ -146,11 +145,6 @@ add_h3 <- function( l[["data"]] <- NULL } - # if( !is.null(l[["bbox"]] ) ) { - # bbox <- l[["bbox"]] - # l[["bbox"]] <- NULL - # } - checkHexAlpha(highlight_colour) layer_id <- layerId(layer_id, "h3") @@ -162,9 +156,11 @@ add_h3 <- function( jsfunc <- "add_h3_hexagon_geo" geometry_column <- "hexagon" + + ## use 'polyline' method because we have strings (cells), not lat/lon coordinates shape <- rcpp_point_polyline( data, l, geometry_column, "h3_hexagon") - #return(shape) + # return(shape) jsfunc <- "add_h3_hexagon" diff --git a/src/point.cpp b/src/point.cpp index f91689d7..8e149ece 100644 --- a/src/point.cpp +++ b/src/point.cpp @@ -56,7 +56,7 @@ Rcpp::StringVector get_point_legend_colours( std::string layer_name ) { Rcpp::StringVector point_legend; - if( layer_name == "column" || layer_name == "scatterplot" ) { + if( layer_name == "column" || layer_name == "scatterplot" || layer_name == "h3_hexagon") { point_legend = mapdeck::layer_colours::fill_stroke_legend; } else if ( layer_name == "pointcloud" ) { point_legend = mapdeck::layer_colours::fill_legend; From 1aba2220db875f15ab872146e89b090c690791cf Mon Sep 17 00:00:00 2001 From: dcooley Date: Tue, 23 Jan 2024 09:32:14 +1100 Subject: [PATCH 3/5] cran --- DESCRIPTION | 33 +- R/data.R | 4 + R/map_layer_h3.R | 2 - R/map_layer_mesh.R | 6 +- R/map_layer_path.R | 2 +- R/map_layer_scatterplot.R | 2 + R/map_layer_terrain.R | 2 +- R/map_layer_trips.R | 1 - R/scratch.R | 383 ------------------------ README.Rmd | 2 +- man/add_h3.Rd | 3 - man/add_path.Rd | 2 +- man/add_scatterplot.Rd | 3 + man/add_terrain.Rd | 2 +- man/add_text.Rd | 3 + man/road_safety.Rd | 16 + src/Makevars | 2 +- src/Makevars.win | 2 +- tests/testthat/test-layer_mesh.R | 8 +- tests/testthat/test-layer_path.R | 6 +- tests/testthat/test-layer_pointcloud.R | 10 +- tests/testthat/test-layer_scatterplot.R | 4 +- tests/testthat/test-layer_text.R | 8 +- tests/testthat/test-layer_trips.R | 2 +- tests/testthat/test-map_layers.R | 8 +- tests/testthat/test-sf_functions.R | 13 +- tests/testthat/test-transitions.R | 8 +- 27 files changed, 87 insertions(+), 450 deletions(-) delete mode 100644 R/scratch.R create mode 100644 man/road_safety.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 4e054083..90b87ad1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: mapdeck Type: Package Title: Interactive Maps Using 'Mapbox GL JS' and 'Deck.gl' -Version: 0.3.40006 -Date: 2024-01-04 +Version: 0.3.5 +Date: 2024-01-23 Authors@R: c( person("David", "Cooley", ,"dcooley@symbolix.com.au", role = c("aut", "cre")) ) @@ -16,17 +16,29 @@ BugReports: https://github.com/SymbolixAU/mapdeck/issues Encoding: UTF-8 LazyData: true Depends: R (>= 3.5.0) +SystemRequirements: C++14 Imports: - colourvalues (>= 0.3.8), + colourvalues (>= 0.3.9), googlePolylines (>= 0.7.2), - geojsonsf (>= 1.3.3), + geojsonsf (>= 2.0.3), htmlwidgets, - jsonify (>= 1.1.1), + jsonify (>= 1.2.2), magrittr, Rcpp (>= 1.0.10), shiny, sfheaders (>= 0.4.4) RoxygenNote: 7.2.3 +LinkingTo: + BH, + colourvalues (>= 0.3.9), + geojsonsf (>= 2.0.3), + geometries (>= 0.2.4), + interleave (>= 0.1.2), + jsonify (>= 1.2.2), + rapidjsonr, + Rcpp (>= 1.0.10), + sfheaders (>= 0.4.2), + spatialwidget (>= 0.2.5) Suggests: covr, googleway, @@ -36,17 +48,6 @@ Suggests: spatialwidget, testthat VignetteBuilder: knitr -LinkingTo: - BH, - colourvalues (>= 0.3.8), - geojsonsf (>= 1.3.3), - geometries (>= 0.2.4), - interleave (>= 0.1.2), - jsonify (>= 1.1.1), - rapidjsonr, - Rcpp (>= 1.0.10), - sfheaders (>= 0.4.2), - spatialwidget (>= 0.2.5) Remotes: dcooley/geometries, dcooley/interleave, diff --git a/R/data.R b/R/data.R index a0ff08e6..1a87262c 100644 --- a/R/data.R +++ b/R/data.R @@ -50,3 +50,7 @@ #' "city_trail" +#' road_safety +#' +#' A data.frame of counts of traffic accidents in the UK +"road_safety" diff --git a/R/map_layer_h3.R b/R/map_layer_h3.R index c2a30920..9968db72 100644 --- a/R/map_layer_h3.R +++ b/R/map_layer_h3.R @@ -160,8 +160,6 @@ add_h3 <- function( ## use 'polyline' method because we have strings (cells), not lat/lon coordinates shape <- rcpp_point_polyline( data, l, geometry_column, "h3_hexagon") - # return(shape) - jsfunc <- "add_h3_hexagon" light_settings <- jsonify::to_json(light_settings, unbox = T) diff --git a/R/map_layer_mesh.R b/R/map_layer_mesh.R index c21050b8..12467464 100644 --- a/R/map_layer_mesh.R +++ b/R/map_layer_mesh.R @@ -39,7 +39,7 @@ find_mesh_index <- function( data ) { #' m <- melbourne_mesh #' m$vb[3, ] <- m$vb[3, ] * 50 #' -#'mapdeck() %>% +#' mapdeck() %>% #' add_mesh( #' data = m #' ) @@ -74,8 +74,8 @@ add_mesh <- function( brush_radius = NULL ) { - if( nrow( data ) == 0 ) { - return( clear_mesh( map, layer_id, ... ) ) + if( length( data ) == 0 ) { + return( clear_mesh( map = map, layer_id = layer_id, update_view = update_view, clear_legend = clear_legend ) ) } experimental_layer( "mesh" ) diff --git a/R/map_layer_path.R b/R/map_layer_path.R index 29c519fe..c6828179 100644 --- a/R/map_layer_path.R +++ b/R/map_layer_path.R @@ -140,7 +140,7 @@ mapdeckPathDependency <- function() { #' , y = "y" #' , linestring_id = "id" #' , list_columns = "col" -#' , keep = T +#' , keep = TRUE #' ) #' #' mapdeck( diff --git a/R/map_layer_scatterplot.R b/R/map_layer_scatterplot.R index 9b3b64ce..1fb7b2c6 100644 --- a/R/map_layer_scatterplot.R +++ b/R/map_layer_scatterplot.R @@ -24,6 +24,8 @@ mapdeckScatterplotDependency <- function() { #' small for the given zoom level #' @param radius_max_pixels the maximum radius in pixels. Can prevent the circle from #' getting too big when zoomed in +#' @param collision_filter set to `TRUE` if you want to hide features that overlap +#' other features. Default is `FALSE` #' #' @inheritSection add_polygon data #' @inheritSection add_arc legend diff --git a/R/map_layer_terrain.R b/R/map_layer_terrain.R index fa1f88d1..5ae88218 100644 --- a/R/map_layer_terrain.R +++ b/R/map_layer_terrain.R @@ -17,7 +17,7 @@ mapdeckTerrainDependency <- function() { #' #' @inheritParams add_arc #' @param elevation_data Image URL that encodes height data. When \code{elevation_data} -#' is a URL template, i.e. a string containing '{x}' and '{y}', it loads terrain tiles on demand +#' is a URL template, i.e. a string containing `{x}` and `{y}`, it loads terrain tiles on demand #' and renders a mesh for each tile. If \code{elevation_data} is an absolute URL, as ingle mesh is used, #' and the \code{bounds} argument is required to position it into the world space. #' @param texture Image URL to use as the texture diff --git a/R/map_layer_trips.R b/R/map_layer_trips.R index 5348ea86..f35c3d95 100644 --- a/R/map_layer_trips.R +++ b/R/map_layer_trips.R @@ -222,7 +222,6 @@ add_trips <- function( #' @rdname clear #' @export - clear_trips <- function( map, layer_id = NULL, update_view = TRUE, clear_legend = TRUE) { layer_id <- layerId(layer_id, "trips") ## TRIPS needs to be stopped first diff --git a/R/scratch.R b/R/scratch.R deleted file mode 100644 index 14485e23..00000000 --- a/R/scratch.R +++ /dev/null @@ -1,383 +0,0 @@ - -# library(sf) -# sf <- roads -# coords <- sf::st_coordinates( sf ) -# sf <- sf::st_as_sf( as.data.frame( coords ), coords = c("X","Y") ) -# -# mapdeck() %>% -# add_scatterplot( -# data = sf -# , brush_radius = 10 -# ) -# - -# -# library(gpxsf) -# library(sf) ## for print methods of sf objects -# gpx <- system.file("gpx/city_trail.gpx", package = "gpx") -# sf <- gpx::gpx_sf( gpx, time = "counter" ) -# -# library(mapdeck) -# -# set_token( read.dcf("~/Documents/.googleAPI", fields = "MAPBOX")) -# -# mapdeck( -# style = mapdeck_style("dark") -# , location = c(144.5, -37.9) -# , zoom = 8 -# ) %>% -# add_trips( -# data = sf -# , trail_length = 2000 -# , animation_speed = 50 -# , stroke_colour = "#FFFFFF" -# ) - -# library(data.table) -# dt <- fread("~/Downloads/Turkey vultures in North and South America.csv") -# -# dt[, timestamp := as.numeric( as.POSIXct(`study-local-timestamp`))] -# dt[, elev := 0 ] -# -# dt_tracks <- dt[ -# , { -# geometry = sf::st_linestring(x = matrix( c(`location-long`, `location-lat`, elev, timestamp), ncol = 4, byrow = F)) -# geometry = sf::st_sf( geometry = sf::st_sfc( geometry )) -# } -# , by = .(`individual-local-identifier`) -# ] -# -# sf <- sf::st_as_sf( dt_tracks ) -# -# m <- sf::st_coordinates( sf ) -# -# attr(sf$geometry, "m_range") <- c("mmin" = min( m[,4]), "mmax" = max( m[,4]) ) -# -# sf[6,] -# -# mapdeck( -# style = mapdeck_style("light") -# ) %>% -# add_trips( -# data = sf[6,] -# , trail_length = 2000 -# , animation_speed = 200 -# , stroke_colour = "individual-local-identifier" -# ) - - -# trips <- jsonlite::fromJSON( 'https://raw.githubusercontent.com/uber-common/deck.gl-data/master/examples/trips/trips.json' ) -# -# library(data.table) -# library(sf) -# library(mapdeck) -# set_token( read.dcf("~/Documents/.googleAPI", fields = "MAPBOX")) -# -# l <- lapply(trips[[2]], as.data.table) -# dt <- rbindlist(l, idcol = T) -# -# dt[, ele := 100L] -# -# sf <- dt[ -# , { -# geometry = sf::st_linestring(x = matrix(c(V1, V2, ele, V3), ncol = 4)) -# geometry = sf::st_sf( geometry = sf::st_sfc( geometry ) ) -# } -# , by = .id -# ] -# -# # dt[, summary(V3)] -# # dt[, .N, by = V3][order(N)] -# -# sf <- sf::st_as_sf( sf ) -# -# mapdeck( -# location = c(-73.9, 40.8) -# , zoom = 10 -# , style = mapdeck_style("dark") -# ) %>% -# add_trips( -# data = sf -# , stroke_colour = ".id" -# ) -# -# mapdeck() %>% -# add_path( data = sf ) - - - -# -# library(data.table) -# library(sf) -# -# sf <- mapdeck::roads -# sf <- sf[, "PFI"] -# -# ## the PFI is a unique identifier -# length(unique( sf$PFI )) == nrow( sf ) -# sf$r <- 1:nrow( sf ) -# -# dt <- as.data.table( sf::st_coordinates( sf ) ) -# -# ## L1 gives the row number (r) from sf -# setnames( dt, names(dt), c("lon","lat","r")) -# -# ## add a sequence value -# dt[, seq := 1:.N, by = r] -# -# ## randomly pick a start time for each road -# dt[, start_time := sample(0:100, size = 1), by = r] -# -# ## set a 'speed' between each sequential coordinate -# dt[, time_to_next_point := sample(10:50, size = .N, replace = TRUE)] -# -# dt[, time := cumsum(time_to_next_point) + start_time, by = r] -# -# dt[, range(time)] -# -# dt[, elev := 0] -# -# sf <- dt[ -# , { -# geometry = sf::st_linestring( x = matrix( c(lon, lat, elev, time ), ncol = 4 ) ) -# geometry = sf::st_sf( geometry = sf::st_sfc( geometry ) ) -# } -# , by = r -# ] %>% sf::st_as_sf() - -## the linestring now has a Z component, which we're usign as 'time' (not elevation) - -## Trip layer coordinates can only include M component, not Z -## Or I need to make the javascript code drop the Z component?? - -# mapdeck( -# style = mapdeck_style("dark") -# , location = c(145., -37.8) -# , zoom = 10 -# ) %>% -# add_trips( -# data = sf[11, ], stroke_colour = "#FFFFFF" -# ) - - - - - - - -# install.packages("plotKML") -# library(plotKML) -# -# gpx <- plotKML::readGPX( gpx.file = "~/Downloads/activity_3412595453.gpx") -# gpx2 <- plotKML::readGPX( gpx.file = "~/Downloads/activity_3389432092.gpx") -# str( gpx ) -# - -# l <- list.files(path = "~/Downloads/", pattern = ".gpx") -# p <- paste0("~/Downloads/", l) -# lst <- lapply( p, plotKML::readGPX ) -# -# lst <- lapply( lst, function( x ) { -# as.data.table( x[["tracks"]][[1]][["Melbourne Cycling"]] ) -# }) -# -# dt <- rbindlist( lst, idcol = T) -# -# dt[, time := anytime::anytime( time, asUTC = TRUE ) ] -# dt[, diff_time := as.numeric( diff( time ) ),by = .(.id) ] -# dt[, t := cumsum( diff_time ), by = .(.id) ] -# -# sf <- dt[ -# , { -# geometry = sf::st_linestring(x = matrix(c(lon, lat, t), ncol = 3)) -# geometry = sf::st_sf( geometry = sf::st_sfc( geometry ) ) -# } -# , by= .(.id) -# ] %>% sf::st_as_sf() -# -# -# mapdeck( -# style = mapdeck_style("dark") -# , location = c(145., -37.8) -# , zoom = 10 -# ) %>% -# add_trips( -# data = sf, stroke_colour = colourvalues::colour_values(1:2)[2] -# ) -# -# -# -# -# as.POSIXct( df$time, format = "%Y-%m-%dT%H:%m:%s", tz = "UTC", origin = "1970-01-01") -# -# df$time <- anytime::anytime( df$time, tz = "Australia/Melbourne" ) -# -# -# f <- fitdc::read_fit( paste0(fp, l[1] ) ) -# -# devtools::install_github("grimbough/fitFileR") -# library(fitFileR) -# -# f <- fitFileR::readFitFile( paste0(fp, l[1] ) ) -# -# -# fp <- "~/Documents/Data/Garmin/Activities/" -# l <- list.files(fp) -# -# # devtools::install_github('kuperov/fit') -# library(fit) -# library(data.table) -# -# lst <- lapply( 1:length(l), function( x ) { -# print(x) -# f <- l[x] -# f <- paste0(fp, f) -# f <- path.expand( f ) -# data <- read.fit( f ) -# data[["record"]] -# }) -# -# dt <- rbindlist(lst, use.names = T, fill = T, idcol = T) -# -# dt <- dt[!is.na( position_lat ) ] -# -# dt[, seq := 1:.N, by = .id] -# -# # dt[, time := anytime::anytime( time, asUTC = TRUE ) ] -# -# dt[, timestamp := as.POSIXct( timestamp, origin = "1990-01-01")] -# dt[, m := data.table::minute( timestamp )] -# dt[, s := data.table::second( timestamp )] -# dt[, h := data.table::hour( timestamp )] -# -# dt[, seconds := ( h * 60 * 60 ) + ( m * 60 ) + s ] -# -# -# -# dt[, diff_time := timestamp - shift(timestamp, type = "lag"), by = .(.id) ] -# dt <- dt[!is.na(diff_time)] -# -# dt[, diff_time := as.numeric( diff_time ) ] -# -# ## Remove stops greater than 1 minutes -# # dt <- dt[ diff_time < 60 ] -# -# -# #dt[, diff_time := as.numeric( diff( timestamp ) ),by = .(.id) ] -# dt[, t := cumsum( diff_time ), by = .(.id) ] -# -# library(sf) -# -# dt[ -# dt[speed > 0, .(avg_speed = mean( speed ) * 1.609), by = .(.id)] -# , on = ".id" -# , avg_speed := i.avg_speed -# ] -# -# sf <- dt[ -# , { -# geometry = sf::st_linestring(x = matrix(c(position_long, position_lat, seconds), ncol = 3)) -# geometry = sf::st_sf( geometry = sf::st_sfc( geometry ) ) -# } -# , by= .(.id, avg_speed) -# ] %>% sf::st_as_sf() -# -# # garmin <- sf -# # -# # usethis::use_data( garmin ) -# -# mapdeck( -# style = mapdeck_style("dark") -# , location = c(145., -37.8) -# , zoom = 10 -# ) %>% -# add_trips( -# data = sf -# , stroke_colour = "avg_speed" -# , loop_length = 65000 -# , animation_speed = 2500 -# , trail_length = 1500 -# , legend = F -# ) -# -# -# -# fp <- "~/Documents/Data/Strava/Bethan/activities/" -# gpx <- plotKML::readGPX( gpx.file = paste0(, fp, "1007343724.gpx" ) ) -# -# -# l <- list.files(path = fp, pattern = ".gpx$", recursive = T) -# l <- paste0(fp, l) -# lst <- lapply(l, function(x) { -# gpx <- plotKML::readGPX(x) -# data <- gpx$tracks[[1]][[1]] -# data -# }) -# -# library(data.table) -# -# dt <- rbindlist(lst, idcol = T, use.names = T, fill = T) -# -# dt[, t := anytime::anytime(time, asUTC = TRUE )] -# -# dt[, m := data.table::minute( t )] -# dt[, s := data.table::second( t )] -# dt[, h := data.table::hour( t )] -# -# dt[, seconds := ( h * 60 * 60 ) + ( m * 60 ) + s ] -# -# dt[, ele := as.numeric( ele )] -# dt[, avg_ele := mean( ele, na.rm = T), by = .id] -# -# -# # dt[, diff_time := as.numeric( diff( time ) ),by = .(.id) ] -# # dt[, t := cumsum( diff_time ), by = .(.id) ] -# -# library(sf) -# sf <- dt[ -# , { -# geometry = sf::st_linestring(x = matrix(c(lon, lat, ele), ncol = 3)) -# geometry = sf::st_sf( geometry = sf::st_sfc( geometry ) ) -# } -# , by= .(.id, avg_ele) -# ] %>% sf::st_as_sf() -# -# -# mapdeck( -# style = mapdeck_style("dark") -# , location = c(145., -37.8) -# , zoom = 10 -# ) %>% -# add_path( -# data = sf[1:20, ] -# , stroke_colour = "avg_ele" -# # , loop_length = 87000 -# # , animation_speed = 2500 -# # , trail_length = 1500 -# , legend = TRUE -# ) -# -# -# fp <- path.expand("~/Documents/Data/Strava/Bethan/activities/") -# l <- list.files(fp, patter = "gpx$") -# -# gpx <- paste0(fp, l) -# -# library(sf) -# -# sf <- gpxsf::gpx_sf( gpx[1], time = "counter" ) -# -# -# mapdeck( -# style = mapdeck_style("dark") -# , location = c(145, -37.8) -# , zoom = 10 -# ) %>% -# add_trips( -# data = sf -# , loop_length = 1440 -# , animation_speed = 10 -# ) - - - diff --git a/README.Rmd b/README.Rmd index 3d27bcfc..cf1af768 100644 --- a/README.Rmd +++ b/README.Rmd @@ -7,7 +7,7 @@ output: github_document ```{r setup, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, - comment = "#>", + comment = "# ", fig.path = "man/figures/README-", out.width = "100%" ) diff --git a/man/add_h3.Rd b/man/add_h3.Rd index 684f26c2..4a3e9e8a 100644 --- a/man/add_h3.Rd +++ b/man/add_h3.Rd @@ -28,7 +28,6 @@ add_h3( legend_format = NULL, update_view = TRUE, focus_layer = FALSE, - digits = 6, transitions = NULL ) } @@ -97,8 +96,6 @@ a named list indicating which colour attributes should be included in the legend \item{focus_layer}{logical indicating if the map should update the bounds to only include this layer} -\item{digits}{number of digits for rounding coordinates} - \item{transitions}{list specifying the duration of transitions.} } \description{ diff --git a/man/add_path.Rd b/man/add_path.Rd index 179332f2..719e37f9 100644 --- a/man/add_path.Rd +++ b/man/add_path.Rd @@ -278,7 +278,7 @@ sf_line <- sfheaders::sf_linestring( , y = "y" , linestring_id = "id" , list_columns = "col" - , keep = T + , keep = TRUE ) mapdeck( diff --git a/man/add_scatterplot.Rd b/man/add_scatterplot.Rd index 8b057703..df457c16 100644 --- a/man/add_scatterplot.Rd +++ b/man/add_scatterplot.Rd @@ -116,6 +116,9 @@ a named list indicating which colour attributes should be included in the legend the arcs will only show if the origin or destination are within the radius of the mouse. If NULL, all arcs are displayed} +\item{collision_filter}{set to `TRUE` if you want to hide features that overlap +other features. Default is `FALSE`} + \item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} } \description{ diff --git a/man/add_terrain.Rd b/man/add_terrain.Rd index e00b0c93..96c3ba5d 100644 --- a/man/add_terrain.Rd +++ b/man/add_terrain.Rd @@ -24,7 +24,7 @@ distinguish between shape layers of the same type. Layers with the same id are l to conflict and not plot correctly} \item{elevation_data}{Image URL that encodes height data. When \code{elevation_data} -is a URL template, i.e. a string containing '{x}' and '{y}', it loads terrain tiles on demand +is a URL template, i.e. a string containing `{x}` and `{y}`, it loads terrain tiles on demand and renders a mesh for each tile. If \code{elevation_data} is an absolute URL, as ingle mesh is used, and the \code{bounds} argument is required to position it into the world space.} diff --git a/man/add_text.Rd b/man/add_text.Rd index 89afb699..5f5ef5f8 100644 --- a/man/add_text.Rd +++ b/man/add_text.Rd @@ -120,6 +120,9 @@ a named list indicating which colour attributes should be included in the legend the arcs will only show if the origin or destination are within the radius of the mouse. If NULL, all arcs are displayed} +\item{collision_filter}{set to `TRUE` if you want to hide features that overlap +other features. Default is `FALSE`} + \item{...}{\code{clear_legend} and \code{clear_view} arguments passed to 'clear_()' functions} } \description{ diff --git a/man/road_safety.Rd b/man/road_safety.Rd new file mode 100644 index 00000000..e76c749d --- /dev/null +++ b/man/road_safety.Rd @@ -0,0 +1,16 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{road_safety} +\alias{road_safety} +\title{road_safety} +\format{ +An object of class \code{data.frame} with 19139 rows and 2 columns. +} +\usage{ +road_safety +} +\description{ +A data.frame of counts of traffic accidents in the UK +} +\keyword{datasets} diff --git a/src/Makevars b/src/Makevars index f9ef6d0b..bedeb7ad 100644 --- a/src/Makevars +++ b/src/Makevars @@ -1,4 +1,4 @@ -CXX_STD = CXX11 +CXX_STD = CXX14 PKG_CXXFLAGS = -I../inst/include PKG_CPPFLAGS = -DSTRICT_R_HEADERS -DBOOST_NO_AUTO_PTR diff --git a/src/Makevars.win b/src/Makevars.win index f9ef6d0b..bedeb7ad 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -1,4 +1,4 @@ -CXX_STD = CXX11 +CXX_STD = CXX14 PKG_CXXFLAGS = -I../inst/include PKG_CPPFLAGS = -DSTRICT_R_HEADERS -DBOOST_NO_AUTO_PTR diff --git a/tests/testthat/test-layer_mesh.R b/tests/testthat/test-layer_mesh.R index 3d9f851c..aa10623c 100644 --- a/tests/testthat/test-layer_mesh.R +++ b/tests/testthat/test-layer_mesh.R @@ -1,9 +1,9 @@ context("mesh") test_that("empty data doesn't crash",{ - # ## issue 252 - # m <- mapdeck() - # res <- mapdeck::add_mesh(map = m, data = data.frame()) - # expect_true( res$x$calls[[1]]$functions == "md_layer_clear" ) + ## issue 252 + m <- mapdeck() + res <- mapdeck::add_mesh(map = m, data = data.frame()) + expect_true( res$x$calls[[1]]$functions == "md_layer_clear" ) }) diff --git a/tests/testthat/test-layer_path.R b/tests/testthat/test-layer_path.R index cd0ba87c..e2eb2d85 100644 --- a/tests/testthat/test-layer_path.R +++ b/tests/testthat/test-layer_path.R @@ -1,7 +1,7 @@ context("path") -test_that("add_path accepts multiple objects", { - +# test_that("add_path accepts multiple objects", { +# # testthat::skip_on_cran() # # geo <- '[{"type":"Feature","properties":{"stroke_colour":"#440154FF","stroke_width":1.0,"dash_size":0.0,"dash_gap":0.0,"offset":0.0},"geometry":{"geometry":{"type":"LineString","coordinates":[[145.014291,-37.830458],[145.014345,-37.830574],[145.01449,-37.830703],[145.01599,-37.831484],[145.016479,-37.831699],[145.016813,-37.83175],[145.01712,-37.831742],[145.0175,-37.831667],[145.017843,-37.831559],[145.018349,-37.83138],[145.018603,-37.83133],[145.018901,-37.831301],[145.019136,-37.831301],[145.01943,-37.831333],[145.019733,-37.831377],[145.020195,-37.831462],[145.020546,-37.831544],[145.020641,-37.83159],[145.020748,-37.83159],[145.020993,-37.831664]]}}},{"type":"Feature","properties":{"stroke_colour":"#440154FF","stroke_width":1.0,"dash_size":0.0,"dash_gap":0.0,"offset":0.0},"geometry":{"geometry":{"type":"LineString","coordinates":[[145.015016,-37.830832],[145.015561,-37.831125],[145.016285,-37.831463],[145.016368,-37.8315],[145.016499,-37.831547],[145.016588,-37.831572],[145.01668,-37.831593],[145.01675,-37.831604],[145.016892,-37.83162],[145.016963,-37.831623],[145.017059,-37.831623],[145.017154,-37.831617],[145.017295,-37.831599],[145.017388,-37.831581],[145.017523,-37.831544],[145.018165,-37.831324],[145.018339,-37.831275],[145.018482,-37.831245],[145.018627,-37.831223],[145.01881,-37.831206],[145.018958,-37.831202],[145.019142,-37.831209],[145.019325,-37.831227],[145.019505,-37.831259],[145.020901,-37.831554],[145.020956,-37.83157]]}}}]' @@ -36,7 +36,7 @@ test_that("add_path accepts multiple objects", { # expect_equal( as.character( p$x$calls[[1]]$args[[2]] ), poly ) # # ## data.frame - not supported for LINESTRINGS -}) +# }) test_that("empty data doesn't crash",{ ## issue 252 diff --git a/tests/testthat/test-layer_pointcloud.R b/tests/testthat/test-layer_pointcloud.R index 906e11ac..646845d5 100644 --- a/tests/testthat/test-layer_pointcloud.R +++ b/tests/testthat/test-layer_pointcloud.R @@ -1,6 +1,6 @@ context("pointcloud") -test_that("add_pointcloud accepts multiple objects", { +# test_that("add_pointcloud accepts multiple objects", { # testthat::skip_on_cran() # library(sfheaders) # @@ -51,10 +51,10 @@ test_that("add_pointcloud accepts multiple objects", { # geo <- '{"elevation":12345.0,"fill_colour":[68.0,1.0,84.0,255.0],"lon":69.11,"lat":34.28,"geometry":[69.11,34.28,12345.0]}' # p <- add_pointcloud( map = m, data = df, lon = "lon", lat = "lat", elevation = "z" ) # check( geo, p ) +# +# }) -}) - -test_that("pointcloud reads elevation from sf Z attribute", { +# test_that("pointcloud reads elevation from sf Z attribute", { # geo <- '[{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0,0,1]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0,0,2]}}]' # sf <- geojsonsf::geojson_sf( geo ) @@ -78,7 +78,7 @@ test_that("pointcloud reads elevation from sf Z attribute", { # shape <- mapdeck:::rcpp_point_sf_columnar( sf, l, geometry_column, digits = 6, "pointcloud" ) # js <- '{"elevation":[1.0,2.0],"fill_colour":[68.0,1.0,84.0,255.0,68.0,1.0,84.0,255.0],"lat":[0.0,0.0],"lon":[0.0,0.0],"geometry":[0.0,0.0,1.0,0.0,0.0,2.0]}' # check( js, shape$data ) -}) +# }) test_that("empty data doesn't crash",{ ## issue 252 diff --git a/tests/testthat/test-layer_scatterplot.R b/tests/testthat/test-layer_scatterplot.R index 690fd79d..3566b69c 100644 --- a/tests/testthat/test-layer_scatterplot.R +++ b/tests/testthat/test-layer_scatterplot.R @@ -1,6 +1,6 @@ context("scatterplot") -test_that("add_scatterplot accepts multiple objects", { +# test_that("add_scatterplot accepts multiple objects", { # testthat::skip_on_cran() # library(sfheaders) # @@ -47,7 +47,7 @@ test_that("add_scatterplot accepts multiple objects", { # p <- add_scatterplot( map = m, data = capitals[1, ], lon = "lon", lat = "lat" ) # check( geo, p ) -}) +# }) test_that("empty data doesn't crash",{ ## issue 252 diff --git a/tests/testthat/test-layer_text.R b/tests/testthat/test-layer_text.R index 7df38854..5a2bc5ca 100644 --- a/tests/testthat/test-layer_text.R +++ b/tests/testthat/test-layer_text.R @@ -1,7 +1,7 @@ context("text") -test_that("add_text accepts multiple objects", { - +# test_that("add_text accepts multiple objects", { +# # testthat::skip_on_cran() # # library(sfheaders) @@ -37,8 +37,8 @@ test_that("add_text accepts multiple objects", { # ## data.frame # p <- add_text( map = m, data = capitals[1, ], lon = "lon", lat = "lat", text = "capital" ) # expect_equal( as.character( p$x$calls[[1]]$args[[2]] ), geo ) - -}) +# +# }) test_that("empty data doesn't crash",{ diff --git a/tests/testthat/test-layer_trips.R b/tests/testthat/test-layer_trips.R index a8935970..396cd4a9 100644 --- a/tests/testthat/test-layer_trips.R +++ b/tests/testthat/test-layer_trips.R @@ -4,5 +4,5 @@ test_that("empty data doesn't crash",{ ## issue 252 m <- mapdeck() res <- mapdeck::add_trips(map = m, data = data.frame()) - expect_true( res$x$calls[[1]]$functions == "md_layer_clear" ) + expect_true( res$x$calls[[1]]$functions == "md_stop_trips" ) }) diff --git a/tests/testthat/test-map_layers.R b/tests/testthat/test-map_layers.R index 127f725a..4fbc795b 100644 --- a/tests/testthat/test-map_layers.R +++ b/tests/testthat/test-map_layers.R @@ -2,6 +2,11 @@ context("map_layers") test_that("layerId includes all layers", { + testthat::skip_on_appveyor() + testthat::skip_on_cran() + testthat::skip_on_travis() + testthat::skip("run these manually") + layers <- c( "animated_arc" , "animated_line" @@ -28,8 +33,6 @@ test_that("layerId includes all layers", { , "trips" ) - # expect_equal( layers, mapdeck:::mapdeck_layers() ) - res <- sapply( layers, function(x) { mapdeck:::layerId( layer_id = "test", layer = x) }) expect_equal( layers, names( res ) ) @@ -40,7 +43,6 @@ test_that("layerId includes all layers", { f <- sort( f ) f <- setdiff(f, c("parameter_checks","sf")) - expect_equal( f, sort( layers ) ) res <- sapply( layers, function(x) { mapdeck:::layerId( layer_id = "test", layer = x) }) diff --git a/tests/testthat/test-sf_functions.R b/tests/testthat/test-sf_functions.R index c99aafb6..ace877ea 100644 --- a/tests/testthat/test-sf_functions.R +++ b/tests/testthat/test-sf_functions.R @@ -1,7 +1,7 @@ context("sf") -test_that("sf objects are subset correctly", { - +# test_that("sf objects are subset correctly", { +# # testthat::skip_on_cran() # testthat::skip_on_travis() # library(sf) @@ -46,11 +46,6 @@ test_that("sf objects are subset correctly", { # l <- list() # l <- mapdeck:::resolve_data( sf, l, "MULTILINESTRING" ) # expect_true(nrow(l$data) == 1) +# +# }) -}) - -test_that("sf objects are CAST correctly",{ - - - -}) diff --git a/tests/testthat/test-transitions.R b/tests/testthat/test-transitions.R index a3362c2d..20803b2f 100644 --- a/tests/testthat/test-transitions.R +++ b/tests/testthat/test-transitions.R @@ -1,7 +1,7 @@ context("transitions") -test_that("transition names replaced", { - +# test_that("transition names replaced", { +# # ## arc # t <- mapdeck:::arc_transitions() # res <- mapdeck:::transitions_arc( t ) @@ -49,5 +49,5 @@ test_that("transition names replaced", { # res <- mapdeck:::transitions_text( t ) # expect_true( all( names( res ) %in% c("getPosition", "getColor","getAngle","getSize") ) ) # expect_true( length( res ) == 4) - -}) +# +# }) From e09225fb272d6bda8e831104e996cf2f2ab79788 Mon Sep 17 00:00:00 2001 From: dcooley Date: Tue, 23 Jan 2024 13:28:42 +1100 Subject: [PATCH 4/5] cran --- .Rbuildignore | 1 + DESCRIPTION | 6 ------ R/map_layer_terrain.R | 2 +- R/map_layer_tile3d.R | 2 +- README.Rmd | 2 +- cran-comments.md | 9 --------- man/add_cesium.Rd | 2 +- man/add_terrain.Rd | 2 +- 8 files changed, 6 insertions(+), 20 deletions(-) delete mode 100644 cran-comments.md diff --git a/.Rbuildignore b/.Rbuildignore index f39daa20..8845645b 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -19,3 +19,4 @@ ^vignettes/trips.Rmd .github ^\.github$ +^CRAN-SUBMISSION$ diff --git a/DESCRIPTION b/DESCRIPTION index 90b87ad1..9065e4e0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -48,9 +48,3 @@ Suggests: spatialwidget, testthat VignetteBuilder: knitr -Remotes: - dcooley/geometries, - dcooley/interleave, - dcooley/sfheaders, - SymbolixAU/geojsonsf, - SymbolixAU/spatialwidget diff --git a/R/map_layer_terrain.R b/R/map_layer_terrain.R index 5ae88218..30323c53 100644 --- a/R/map_layer_terrain.R +++ b/R/map_layer_terrain.R @@ -17,7 +17,7 @@ mapdeckTerrainDependency <- function() { #' #' @inheritParams add_arc #' @param elevation_data Image URL that encodes height data. When \code{elevation_data} -#' is a URL template, i.e. a string containing `{x}` and `{y}`, it loads terrain tiles on demand +#' is a URL template, i.e. a string containing `\{x\}` and `\{y\}`, it loads terrain tiles on demand #' and renders a mesh for each tile. If \code{elevation_data} is an absolute URL, as ingle mesh is used, #' and the \code{bounds} argument is required to position it into the world space. #' @param texture Image URL to use as the texture diff --git a/R/map_layer_tile3d.R b/R/map_layer_tile3d.R index de31b021..ce9e4279 100644 --- a/R/map_layer_tile3d.R +++ b/R/map_layer_tile3d.R @@ -40,7 +40,7 @@ mapdeckTile3DDependency <- function() { #' Add Cesium #' #' Renders 3D tiles data from Cesium ION assets. To use this layer you need a -#' Cesium ION account \url{https://cesium.com/docs/tutorials/getting-started/#your-first-app}. +#' Cesium ION account \url{https://cesium.com/learn/cesiumjs-learn/cesiumjs-quickstart/#your-first-app}. #' This layer is experimental #' #' @inheritParams add_pointcloud diff --git a/README.Rmd b/README.Rmd index cf1af768..8bd87bba 100644 --- a/README.Rmd +++ b/README.Rmd @@ -15,7 +15,7 @@ knitr::opts_chunk$set( # mapdeck [![R build status](https://github.com/SymbolixAU/mapdeck/workflows/R-CMD-check/badge.svg)](https://github.com/SymbolixAU/mapdeck/actions) -[![Codecov test coverage](https://codecov.io/gh/symbolixau/mapdeck/branch/master/graph/badge.svg)](https://codecov.io/gh/symbolixau/mapdeck?branch=master) +[![Codecov test coverage](https://app.codecov.io/gh/symbolixau/mapdeck?branch=master) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/mapdeck)](https://CRAN.R-project.org/package=mapdeck) ![downloads](http://cranlogs.r-pkg.org/badges/grand-total/mapdeck) [![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/mapdeck)](https://CRAN.R-project.org/package=mapdeck) diff --git a/cran-comments.md b/cran-comments.md deleted file mode 100644 index 85e3cccb..00000000 --- a/cran-comments.md +++ /dev/null @@ -1,9 +0,0 @@ -## Comments - -* Updates v0.3.2 to v0.3.3 -* two bug fixes - -## Tests - -* rhub - check for cran -* rhub - check with sanitizers diff --git a/man/add_cesium.Rd b/man/add_cesium.Rd index 8c0d87e6..57b00e5c 100644 --- a/man/add_cesium.Rd +++ b/man/add_cesium.Rd @@ -22,7 +22,7 @@ to conflict and not plot correctly} } \description{ Renders 3D tiles data from Cesium ION assets. To use this layer you need a -Cesium ION account \url{https://cesium.com/docs/tutorials/getting-started/#your-first-app}. +Cesium ION account \url{https://cesium.com/learn/cesiumjs-learn/cesiumjs-quickstart/#your-first-app}. This layer is experimental } \examples{ diff --git a/man/add_terrain.Rd b/man/add_terrain.Rd index 96c3ba5d..c8883370 100644 --- a/man/add_terrain.Rd +++ b/man/add_terrain.Rd @@ -24,7 +24,7 @@ distinguish between shape layers of the same type. Layers with the same id are l to conflict and not plot correctly} \item{elevation_data}{Image URL that encodes height data. When \code{elevation_data} -is a URL template, i.e. a string containing `{x}` and `{y}`, it loads terrain tiles on demand +is a URL template, i.e. a string containing `\{x\}` and `\{y\}`, it loads terrain tiles on demand and renders a mesh for each tile. If \code{elevation_data} is an absolute URL, as ingle mesh is used, and the \code{bounds} argument is required to position it into the world space.} From 01870a61ac784bf6d4bd251500587a1824cbfebc Mon Sep 17 00:00:00 2001 From: dcooley Date: Mon, 29 Jan 2024 13:46:01 +1100 Subject: [PATCH 5/5] cran --- DESCRIPTION | 4 ++-- README.Rmd | 2 +- README.md | 15 +++++++++------ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9065e4e0..5daf84eb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: mapdeck Type: Package Title: Interactive Maps Using 'Mapbox GL JS' and 'Deck.gl' Version: 0.3.5 -Date: 2024-01-23 +Date: 2024-01-29 Authors@R: c( person("David", "Cooley", ,"dcooley@symbolix.com.au", role = c("aut", "cre")) ) @@ -37,7 +37,7 @@ LinkingTo: jsonify (>= 1.2.2), rapidjsonr, Rcpp (>= 1.0.10), - sfheaders (>= 0.4.2), + sfheaders (>= 0.4.4), spatialwidget (>= 0.2.5) Suggests: covr, diff --git a/README.Rmd b/README.Rmd index 8bd87bba..948f573e 100644 --- a/README.Rmd +++ b/README.Rmd @@ -34,7 +34,7 @@ browser can handle), on interactive maps using Mapbox GL and Deck.gl > Mapbox is the location data platform for mobile and web applications. We provide building blocks to add location features like maps, search, and navigation into any experience you create. -- https://www.mapbox.com/about/ +- https://www.mapbox.com/about/company ## What is deck.gl? diff --git a/README.md b/README.md index 2d39fa18..18649050 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ [![R build status](https://github.com/SymbolixAU/mapdeck/workflows/R-CMD-check/badge.svg)](https://github.com/SymbolixAU/mapdeck/actions) -[![Codecov test -coverage](https://codecov.io/gh/symbolixau/mapdeck/branch/master/graph/badge.svg)](https://codecov.io/gh/symbolixau/mapdeck?branch=master) -[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/mapdeck)](https://CRAN.R-project.org/package=mapdeck) +\[![Codecov test +coverage](https://app.codecov.io/gh/symbolixau/mapdeck?branch=master) +[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/mapdeck)](https://CRAN.R-project.org/package=mapdeck) ![downloads](http://cranlogs.r-pkg.org/badges/grand-total/mapdeck) [![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/mapdeck)](https://CRAN.R-project.org/package=mapdeck) @@ -29,14 +29,14 @@ browser can handle), on interactive maps using Mapbox GL and Deck.gl > We provide building blocks to add location features like maps, search, > and navigation into any experience you create. -- +- ## What is deck.gl? > deck.gl is a WebGL-powered framework for visual exploratory data > analysis of large datasets. -- +- ## How do I use it? @@ -92,7 +92,10 @@ mapdeck(token = key, style = mapdeck_style('dark')) %>% ) ``` -![Arcs](./vignettes/img/readme_arcs_small.gif) +
+Arcs + +
See the [Layers](https://symbolixau.github.io/mapdeck/articles/layers.html) page