From 67453e9198c48e338e546017dbff2f185f45a3c8 Mon Sep 17 00:00:00 2001 From: David Hodge Date: Thu, 13 Aug 2020 13:13:33 +1200 Subject: [PATCH] V2.0 :) --- DESCRIPTION | 2 +- NEWS.md | 10 +++------- R/leaflet_sf_fun.R | 8 ++++---- docs/404.html | 2 +- docs/LICENSE-text.html | 2 +- docs/LICENSE.html | 2 +- docs/articles/index.html | 2 +- docs/articles/simplevis.html | 4 ++-- docs/authors.html | 2 +- docs/index.html | 2 +- docs/news/index.html | 18 +++++++----------- docs/pkgdown.yml | 2 +- docs/reference/a4_height_mm.html | 2 +- docs/reference/a4_width_mm.html | 2 +- docs/reference/add_tip.html | 2 +- docs/reference/example_sf_nz_livestock.html | 2 +- docs/reference/example_sf_nz_river_wq.html | 2 +- docs/reference/example_stars_nz_drp.html | 2 +- docs/reference/example_stars_nz_no3n.html | 2 +- docs/reference/ggplot_box.html | 2 +- docs/reference/ggplot_box_facet.html | 2 +- docs/reference/ggplot_hbar.html | 2 +- docs/reference/ggplot_hbar_col.html | 2 +- docs/reference/ggplot_hbar_col_facet.html | 2 +- docs/reference/ggplot_hbar_facet.html | 2 +- docs/reference/ggplot_line.html | 2 +- docs/reference/ggplot_line_col.html | 2 +- docs/reference/ggplot_line_col_facet.html | 2 +- docs/reference/ggplot_line_facet.html | 2 +- docs/reference/ggplot_scatter.html | 2 +- docs/reference/ggplot_scatter_col.html | 2 +- docs/reference/ggplot_scatter_col_facet.html | 2 +- docs/reference/ggplot_scatter_facet.html | 2 +- docs/reference/ggplot_sf.html | 2 +- docs/reference/ggplot_sf_col.html | 2 +- docs/reference/ggplot_sf_col_facet.html | 2 +- docs/reference/ggplot_sf_facet.html | 2 +- docs/reference/ggplot_stars.html | 2 +- docs/reference/ggplot_stars_col.html | 2 +- docs/reference/ggplot_stars_col_facet.html | 2 +- docs/reference/ggplot_stars_facet.html | 2 +- docs/reference/ggplot_vbar.html | 2 +- docs/reference/ggplot_vbar_col.html | 2 +- docs/reference/ggplot_vbar_col_facet.html | 2 +- docs/reference/ggplot_vbar_facet.html | 2 +- docs/reference/index.html | 2 +- docs/reference/leaflet_basemap.html | 2 +- docs/reference/leaflet_basemap_nz.html | 2 +- docs/reference/leaflet_sf.html | 6 +++--- docs/reference/leaflet_sf_col.html | 6 +++--- docs/reference/leaflet_stars.html | 2 +- docs/reference/leaflet_stars_col.html | 2 +- docs/reference/numeric_legend_labels.html | 2 +- docs/reference/nz.html | 2 +- docs/reference/pal_ea19.html | 2 +- docs/reference/pal_ea19_nof4.html | 2 +- docs/reference/pal_ea19_nof5.html | 2 +- docs/reference/pal_ea19_nztcs_c.html | 2 +- docs/reference/pal_ea19_trend2.html | 2 +- docs/reference/pal_ea19_trend3.html | 2 +- docs/reference/pal_ea19_trend5.html | 2 +- docs/reference/pal_point_set1.html | 2 +- docs/reference/pal_point_trend2.html | 2 +- docs/reference/pal_point_trend3.html | 2 +- docs/reference/pal_point_trend5.html | 2 +- docs/reference/pal_snz.html | 2 +- docs/reference/pal_snz_nof4.html | 2 +- docs/reference/pal_snz_nof5.html | 2 +- docs/reference/pal_snz_nztcs_c.html | 2 +- docs/reference/pal_snz_nztcs_s.html | 2 +- docs/reference/pal_snz_trend2.html | 2 +- docs/reference/pal_snz_trend3.html | 2 +- docs/reference/pal_snz_trend5.html | 2 +- docs/reference/pipe.html | 2 +- docs/reference/plotly_camera.html | 2 +- docs/reference/plotly_legend_order.html | 2 +- docs/reference/plotly_legend_rev.html | 2 +- docs/reference/run_template.html | 2 +- docs/reference/sentence_spaced_colnames.html | 2 +- docs/reference/signed_sqrt_trans.html | 2 +- docs/reference/theme_box.html | 2 +- docs/reference/theme_hbar.html | 2 +- docs/reference/theme_line.html | 2 +- docs/reference/theme_scatter.html | 2 +- docs/reference/theme_sf.html | 2 +- docs/reference/theme_stars.html | 2 +- docs/reference/theme_vbar.html | 2 +- inst/shiny/template1/data/template1.zip | Bin 158489 -> 158618 bytes inst/shiny/template1/make_app_vis.R | 9 ++++++--- inst/shiny/template1/server.R | 13 ++++++++----- inst/shiny/template2/data/template2.zip | Bin 180846 -> 180984 bytes inst/shiny/template2/global.R | 2 +- inst/shiny/template2/make_app_vis.R | 16 ++++++++++------ inst/shiny/template2/server.R | 12 ++++++++---- man/leaflet_sf.Rd | 4 ++-- man/leaflet_sf_col.Rd | 4 ++-- 96 files changed, 140 insertions(+), 134 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index fa954524..43deddd7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: simplevis Type: Package Title: Simple Visualisation with 'ggplot2' and 'leaflet' Wrappers -Version: 1.8.3 +Version: 2.0.0 Authors@R: c(person(given = "David", family = "Hodge", diff --git a/NEWS.md b/NEWS.md index 546b0a93..2a6147b5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,13 +1,9 @@ -# simplevis 1.8.3 +# simplevis 2.0.0 +* Update shiny templates. +* Update leaflet radius default to 2. * Drop region, TA and sea-draining catchments from nz basemap stack. - -# simplevis 1.8.2 - * Removed code to automate isMobile, as it was not working. - -# simplevis 1.8.1 - * Removed na_tip as was not working. # simplevis 1.8.0 diff --git a/R/leaflet_sf_fun.R b/R/leaflet_sf_fun.R index 3bdb53ea..a3b14241 100644 --- a/R/leaflet_sf_fun.R +++ b/R/leaflet_sf_fun.R @@ -5,7 +5,7 @@ #' @param data An sf object of geometry type point/multipoint, linestring/multilinestring or polygon/multipolygon geometry type. Required input. #' @param pal Character vector of hex codes. Defaults to NULL, which selects the Stats NZ palette. #' @param popup HTML strings for use in popup. Defaults to making a leafpop::popupTable of all attribute columns in the sf object. -#' @param radius Radius of points. Defaults to 1. +#' @param radius Radius of points. Defaults to 2. #' @param weight Stroke border size. Defaults to 2. #' @param opacity The opacity of the fill. Defaults to 0.1. Only applicable to polygons. #' @param stroke TRUE or FALSE of whether to draw a border around the features. Defaults to TRUE. @@ -24,7 +24,7 @@ leaflet_sf <- function(data, pal = NULL, popup = leafpop::popupTable(sentence_spaced_colnames(data)), - radius = 1, + radius = 2, weight = 2, opacity = 0.1, stroke = TRUE, @@ -197,7 +197,7 @@ leaflet_sf <- function(data, #' @param pal Character vector of hex codes. Defaults to NULL, which selects the colorbrewer Set1 or viridis. #' @param pal_rev Reverses the palette. Defaults to FALSE. #' @param popup HTML strings for use in popup. Defaults to making a leafpop::popupTable of all attribute columns in the sf object. -#' @param radius Radius of points. Defaults to 1. +#' @param radius Radius of points. Defaults to 2. #' @param weight Stroke border size. Defaults to 2. #' @param stroke TRUE or FALSE of whether to draw a border around the features. Defaults to TRUE. #' @param opacity The opacity of polygons. Defaults to 0.9. @@ -234,7 +234,7 @@ leaflet_sf_col <- function(data, pal = NULL, pal_rev = FALSE, popup = leafpop::popupTable(sentence_spaced_colnames(data)), - radius = 1, + radius = 2, weight = 2, opacity = 0.9, stroke = TRUE, diff --git a/docs/404.html b/docs/404.html index 6c765a8f..f2fbb27c 100644 --- a/docs/404.html +++ b/docs/404.html @@ -78,7 +78,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 7bf7b839..aca5ccdd 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -78,7 +78,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/LICENSE.html b/docs/LICENSE.html index fea957b1..0bd4c560 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -78,7 +78,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/articles/index.html b/docs/articles/index.html index 63e5850e..44282601 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -78,7 +78,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/articles/simplevis.html b/docs/articles/simplevis.html index 646e6532..cf015bf1 100644 --- a/docs/articles/simplevis.html +++ b/docs/articles/simplevis.html @@ -38,7 +38,7 @@ simplevis - 1.8.2 + 2.0.0 @@ -83,7 +83,7 @@

simplevis

David Hodge

-

2020-08-07

+

2020-08-13

Source: vignettes/simplevis.Rmd diff --git a/docs/authors.html b/docs/authors.html index e59653b7..6bd3666a 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -78,7 +78,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/index.html b/docs/index.html index e31f1eab..b9faa6e3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -38,7 +38,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/news/index.html b/docs/news/index.html index c9a3a83e..54fff5ee 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -78,7 +78,7 @@ simplevis - 1.8.2 + 2.0.0 @@ -125,19 +125,15 @@

Changelog

Source: NEWS.md -
-

-simplevis 1.8.2 Unreleased +
+

+simplevis 2.0.0 Unreleased

    +
  • Update shiny templates.
  • +
  • Update leaflet radius default to 2.
  • +
  • Drop region, TA and sea-draining catchments from nz basemap stack.
  • Removed code to automate isMobile, as it was not working.
  • -
-
-
-

-simplevis 1.8.1 Unreleased -

-
  • Removed na_tip as was not working.
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index b8af26b8..c2a40a31 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -3,5 +3,5 @@ pkgdown: 1.5.1 pkgdown_sha: ~ articles: simplevis: simplevis.html -last_built: 2020-08-06T21:56Z +last_built: 2020-08-13T00:04Z diff --git a/docs/reference/a4_height_mm.html b/docs/reference/a4_height_mm.html index f6a82820..a00c5f98 100644 --- a/docs/reference/a4_height_mm.html +++ b/docs/reference/a4_height_mm.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0

diff --git a/docs/reference/a4_width_mm.html b/docs/reference/a4_width_mm.html index 2cd8d6aa..7d26a16e 100644 --- a/docs/reference/a4_width_mm.html +++ b/docs/reference/a4_width_mm.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/add_tip.html b/docs/reference/add_tip.html index cc54a97d..cf1a634d 100644 --- a/docs/reference/add_tip.html +++ b/docs/reference/add_tip.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/example_sf_nz_livestock.html b/docs/reference/example_sf_nz_livestock.html index 13e0f4b7..3d4c1226 100644 --- a/docs/reference/example_sf_nz_livestock.html +++ b/docs/reference/example_sf_nz_livestock.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/example_sf_nz_river_wq.html b/docs/reference/example_sf_nz_river_wq.html index 2f3a9a7b..3a2cfc86 100644 --- a/docs/reference/example_sf_nz_river_wq.html +++ b/docs/reference/example_sf_nz_river_wq.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/example_stars_nz_drp.html b/docs/reference/example_stars_nz_drp.html index d1e34d10..d043d5be 100644 --- a/docs/reference/example_stars_nz_drp.html +++ b/docs/reference/example_stars_nz_drp.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/example_stars_nz_no3n.html b/docs/reference/example_stars_nz_no3n.html index 8a9e3947..d47fec83 100644 --- a/docs/reference/example_stars_nz_no3n.html +++ b/docs/reference/example_stars_nz_no3n.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_box.html b/docs/reference/ggplot_box.html index 340b1d4e..a0e5b484 100644 --- a/docs/reference/ggplot_box.html +++ b/docs/reference/ggplot_box.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_box_facet.html b/docs/reference/ggplot_box_facet.html index 18d3b77f..6ee00193 100644 --- a/docs/reference/ggplot_box_facet.html +++ b/docs/reference/ggplot_box_facet.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_hbar.html b/docs/reference/ggplot_hbar.html index 6eee2120..e615dfa3 100644 --- a/docs/reference/ggplot_hbar.html +++ b/docs/reference/ggplot_hbar.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_hbar_col.html b/docs/reference/ggplot_hbar_col.html index 4072ff79..c16cd88a 100644 --- a/docs/reference/ggplot_hbar_col.html +++ b/docs/reference/ggplot_hbar_col.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_hbar_col_facet.html b/docs/reference/ggplot_hbar_col_facet.html index 85e7aada..34d7780c 100644 --- a/docs/reference/ggplot_hbar_col_facet.html +++ b/docs/reference/ggplot_hbar_col_facet.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_hbar_facet.html b/docs/reference/ggplot_hbar_facet.html index 1d6e5edd..d7e50075 100644 --- a/docs/reference/ggplot_hbar_facet.html +++ b/docs/reference/ggplot_hbar_facet.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_line.html b/docs/reference/ggplot_line.html index 4eeda277..b32f7f46 100644 --- a/docs/reference/ggplot_line.html +++ b/docs/reference/ggplot_line.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_line_col.html b/docs/reference/ggplot_line_col.html index 7ae04b7c..f2c09cac 100644 --- a/docs/reference/ggplot_line_col.html +++ b/docs/reference/ggplot_line_col.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_line_col_facet.html b/docs/reference/ggplot_line_col_facet.html index da670ae7..6e7cc8c1 100644 --- a/docs/reference/ggplot_line_col_facet.html +++ b/docs/reference/ggplot_line_col_facet.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_line_facet.html b/docs/reference/ggplot_line_facet.html index 9c762797..cf5f32c0 100644 --- a/docs/reference/ggplot_line_facet.html +++ b/docs/reference/ggplot_line_facet.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_scatter.html b/docs/reference/ggplot_scatter.html index 97f44b83..b59b8440 100644 --- a/docs/reference/ggplot_scatter.html +++ b/docs/reference/ggplot_scatter.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_scatter_col.html b/docs/reference/ggplot_scatter_col.html index 80d8e768..9def7c79 100644 --- a/docs/reference/ggplot_scatter_col.html +++ b/docs/reference/ggplot_scatter_col.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_scatter_col_facet.html b/docs/reference/ggplot_scatter_col_facet.html index 18049111..1c77ef37 100644 --- a/docs/reference/ggplot_scatter_col_facet.html +++ b/docs/reference/ggplot_scatter_col_facet.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_scatter_facet.html b/docs/reference/ggplot_scatter_facet.html index 5df435cb..807a1f90 100644 --- a/docs/reference/ggplot_scatter_facet.html +++ b/docs/reference/ggplot_scatter_facet.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_sf.html b/docs/reference/ggplot_sf.html index 17221a8c..3238b6d8 100644 --- a/docs/reference/ggplot_sf.html +++ b/docs/reference/ggplot_sf.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_sf_col.html b/docs/reference/ggplot_sf_col.html index e84c67c5..34f643c8 100644 --- a/docs/reference/ggplot_sf_col.html +++ b/docs/reference/ggplot_sf_col.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_sf_col_facet.html b/docs/reference/ggplot_sf_col_facet.html index fe99ec04..924cc8cf 100644 --- a/docs/reference/ggplot_sf_col_facet.html +++ b/docs/reference/ggplot_sf_col_facet.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_sf_facet.html b/docs/reference/ggplot_sf_facet.html index a7dd4411..38834200 100644 --- a/docs/reference/ggplot_sf_facet.html +++ b/docs/reference/ggplot_sf_facet.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_stars.html b/docs/reference/ggplot_stars.html index 5d46b141..251eedda 100644 --- a/docs/reference/ggplot_stars.html +++ b/docs/reference/ggplot_stars.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_stars_col.html b/docs/reference/ggplot_stars_col.html index b3fa54fe..5c938ded 100644 --- a/docs/reference/ggplot_stars_col.html +++ b/docs/reference/ggplot_stars_col.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_stars_col_facet.html b/docs/reference/ggplot_stars_col_facet.html index 6aaa29c0..1e59167e 100644 --- a/docs/reference/ggplot_stars_col_facet.html +++ b/docs/reference/ggplot_stars_col_facet.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_stars_facet.html b/docs/reference/ggplot_stars_facet.html index f516c4ed..9323bd55 100644 --- a/docs/reference/ggplot_stars_facet.html +++ b/docs/reference/ggplot_stars_facet.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_vbar.html b/docs/reference/ggplot_vbar.html index ce88f7e8..13d9fa60 100644 --- a/docs/reference/ggplot_vbar.html +++ b/docs/reference/ggplot_vbar.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_vbar_col.html b/docs/reference/ggplot_vbar_col.html index bace0f29..f3dbf0fd 100644 --- a/docs/reference/ggplot_vbar_col.html +++ b/docs/reference/ggplot_vbar_col.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_vbar_col_facet.html b/docs/reference/ggplot_vbar_col_facet.html index 2eb9c77a..7c3debb8 100644 --- a/docs/reference/ggplot_vbar_col_facet.html +++ b/docs/reference/ggplot_vbar_col_facet.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/ggplot_vbar_facet.html b/docs/reference/ggplot_vbar_facet.html index b79923b6..19838a30 100644 --- a/docs/reference/ggplot_vbar_facet.html +++ b/docs/reference/ggplot_vbar_facet.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/index.html b/docs/reference/index.html index c239c20c..63799126 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -78,7 +78,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/leaflet_basemap.html b/docs/reference/leaflet_basemap.html index 04737db2..1be0630e 100644 --- a/docs/reference/leaflet_basemap.html +++ b/docs/reference/leaflet_basemap.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/leaflet_basemap_nz.html b/docs/reference/leaflet_basemap_nz.html index 4f3b279a..cba5bea8 100644 --- a/docs/reference/leaflet_basemap_nz.html +++ b/docs/reference/leaflet_basemap_nz.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/leaflet_sf.html b/docs/reference/leaflet_sf.html index 5731a3ab..0e1a078a 100644 --- a/docs/reference/leaflet_sf.html +++ b/docs/reference/leaflet_sf.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 @@ -136,7 +136,7 @@

Map of simple features in leaflet.

leaflet_sf(data, pal = NULL,
   popup = leafpop::popupTable(sentence_spaced_colnames(data)),
-  radius = 1, weight = 2, opacity = 0.1, stroke = TRUE,
+  radius = 2, weight = 2, opacity = 0.1, stroke = TRUE,
   title = "[Title]", legend_digits = 1, legend_labels = "[Feature]",
   basemap = "light", map_id = "map")
@@ -157,7 +157,7 @@

Arg radius -

Radius of points. Defaults to 1.

+

Radius of points. Defaults to 2.

weight diff --git a/docs/reference/leaflet_sf_col.html b/docs/reference/leaflet_sf_col.html index d5355428..6519e846 100644 --- a/docs/reference/leaflet_sf_col.html +++ b/docs/reference/leaflet_sf_col.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 @@ -138,7 +138,7 @@

Map of simple features in leaflet that is coloured.

col_cuts = NULL, col_drop = FALSE, col_na_remove = FALSE, pal = NULL, pal_rev = FALSE, popup = leafpop::popupTable(sentence_spaced_colnames(data)), - radius = 1, weight = 2, opacity = 0.9, stroke = TRUE, + radius = 2, weight = 2, opacity = 0.9, stroke = TRUE, title = "[Title]", legend_digits = 1, legend_labels = NULL, basemap = "light", map_id = "map") @@ -187,7 +187,7 @@

Arg radius -

Radius of points. Defaults to 1.

+

Radius of points. Defaults to 2.

weight diff --git a/docs/reference/leaflet_stars.html b/docs/reference/leaflet_stars.html index ec1db500..e6baac02 100644 --- a/docs/reference/leaflet_stars.html +++ b/docs/reference/leaflet_stars.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/leaflet_stars_col.html b/docs/reference/leaflet_stars_col.html index 97bd62b3..94dcfe01 100644 --- a/docs/reference/leaflet_stars_col.html +++ b/docs/reference/leaflet_stars_col.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/numeric_legend_labels.html b/docs/reference/numeric_legend_labels.html index 5af1c082..521475d2 100644 --- a/docs/reference/numeric_legend_labels.html +++ b/docs/reference/numeric_legend_labels.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/nz.html b/docs/reference/nz.html index 097810a3..81504be5 100644 --- a/docs/reference/nz.html +++ b/docs/reference/nz.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_ea19.html b/docs/reference/pal_ea19.html index 09af0752..9b372819 100644 --- a/docs/reference/pal_ea19.html +++ b/docs/reference/pal_ea19.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_ea19_nof4.html b/docs/reference/pal_ea19_nof4.html index 7330ccda..6ea6cd5b 100644 --- a/docs/reference/pal_ea19_nof4.html +++ b/docs/reference/pal_ea19_nof4.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_ea19_nof5.html b/docs/reference/pal_ea19_nof5.html index 6462f349..36f7b251 100644 --- a/docs/reference/pal_ea19_nof5.html +++ b/docs/reference/pal_ea19_nof5.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_ea19_nztcs_c.html b/docs/reference/pal_ea19_nztcs_c.html index a717c7cf..b857fc00 100644 --- a/docs/reference/pal_ea19_nztcs_c.html +++ b/docs/reference/pal_ea19_nztcs_c.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_ea19_trend2.html b/docs/reference/pal_ea19_trend2.html index 693d8cf2..42e76427 100644 --- a/docs/reference/pal_ea19_trend2.html +++ b/docs/reference/pal_ea19_trend2.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_ea19_trend3.html b/docs/reference/pal_ea19_trend3.html index 042e22ae..ccb9392c 100644 --- a/docs/reference/pal_ea19_trend3.html +++ b/docs/reference/pal_ea19_trend3.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_ea19_trend5.html b/docs/reference/pal_ea19_trend5.html index 937fe49c..589518e6 100644 --- a/docs/reference/pal_ea19_trend5.html +++ b/docs/reference/pal_ea19_trend5.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_point_set1.html b/docs/reference/pal_point_set1.html index 6b5d773d..07587331 100644 --- a/docs/reference/pal_point_set1.html +++ b/docs/reference/pal_point_set1.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_point_trend2.html b/docs/reference/pal_point_trend2.html index 226c0eed..c9062c18 100644 --- a/docs/reference/pal_point_trend2.html +++ b/docs/reference/pal_point_trend2.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_point_trend3.html b/docs/reference/pal_point_trend3.html index 4452872e..a01cf23e 100644 --- a/docs/reference/pal_point_trend3.html +++ b/docs/reference/pal_point_trend3.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_point_trend5.html b/docs/reference/pal_point_trend5.html index 089cbac5..6fda9cb2 100644 --- a/docs/reference/pal_point_trend5.html +++ b/docs/reference/pal_point_trend5.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_snz.html b/docs/reference/pal_snz.html index 2c0edda1..dc2de29c 100644 --- a/docs/reference/pal_snz.html +++ b/docs/reference/pal_snz.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_snz_nof4.html b/docs/reference/pal_snz_nof4.html index 95ba9ce2..770155dd 100644 --- a/docs/reference/pal_snz_nof4.html +++ b/docs/reference/pal_snz_nof4.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_snz_nof5.html b/docs/reference/pal_snz_nof5.html index 975dffb4..bd4bbbb1 100644 --- a/docs/reference/pal_snz_nof5.html +++ b/docs/reference/pal_snz_nof5.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_snz_nztcs_c.html b/docs/reference/pal_snz_nztcs_c.html index a0b3df63..e627ee30 100644 --- a/docs/reference/pal_snz_nztcs_c.html +++ b/docs/reference/pal_snz_nztcs_c.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_snz_nztcs_s.html b/docs/reference/pal_snz_nztcs_s.html index c34a8e24..85e58b3c 100644 --- a/docs/reference/pal_snz_nztcs_s.html +++ b/docs/reference/pal_snz_nztcs_s.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_snz_trend2.html b/docs/reference/pal_snz_trend2.html index 7e530051..a38d822d 100644 --- a/docs/reference/pal_snz_trend2.html +++ b/docs/reference/pal_snz_trend2.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_snz_trend3.html b/docs/reference/pal_snz_trend3.html index 4a06d2ae..eb3e5748 100644 --- a/docs/reference/pal_snz_trend3.html +++ b/docs/reference/pal_snz_trend3.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pal_snz_trend5.html b/docs/reference/pal_snz_trend5.html index 1392276e..337f3b9e 100644 --- a/docs/reference/pal_snz_trend5.html +++ b/docs/reference/pal_snz_trend5.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/pipe.html b/docs/reference/pipe.html index b769a3af..f990452c 100644 --- a/docs/reference/pipe.html +++ b/docs/reference/pipe.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/plotly_camera.html b/docs/reference/plotly_camera.html index b5307df6..cd7fbad9 100644 --- a/docs/reference/plotly_camera.html +++ b/docs/reference/plotly_camera.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/plotly_legend_order.html b/docs/reference/plotly_legend_order.html index 7e720ed6..c8b6d0a1 100644 --- a/docs/reference/plotly_legend_order.html +++ b/docs/reference/plotly_legend_order.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/plotly_legend_rev.html b/docs/reference/plotly_legend_rev.html index ab56033f..28a6e6b9 100644 --- a/docs/reference/plotly_legend_rev.html +++ b/docs/reference/plotly_legend_rev.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/run_template.html b/docs/reference/run_template.html index ebf4ac61..827c5d48 100644 --- a/docs/reference/run_template.html +++ b/docs/reference/run_template.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/sentence_spaced_colnames.html b/docs/reference/sentence_spaced_colnames.html index f154a6e2..ba3956d2 100644 --- a/docs/reference/sentence_spaced_colnames.html +++ b/docs/reference/sentence_spaced_colnames.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/signed_sqrt_trans.html b/docs/reference/signed_sqrt_trans.html index 1c26ebe9..479f5eed 100644 --- a/docs/reference/signed_sqrt_trans.html +++ b/docs/reference/signed_sqrt_trans.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/theme_box.html b/docs/reference/theme_box.html index ef0d79da..f534ef9e 100644 --- a/docs/reference/theme_box.html +++ b/docs/reference/theme_box.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/theme_hbar.html b/docs/reference/theme_hbar.html index 441cbe56..aa856cf2 100644 --- a/docs/reference/theme_hbar.html +++ b/docs/reference/theme_hbar.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/theme_line.html b/docs/reference/theme_line.html index 1a7250b8..93726146 100644 --- a/docs/reference/theme_line.html +++ b/docs/reference/theme_line.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/theme_scatter.html b/docs/reference/theme_scatter.html index 1e529830..ff16e7d8 100644 --- a/docs/reference/theme_scatter.html +++ b/docs/reference/theme_scatter.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/theme_sf.html b/docs/reference/theme_sf.html index 16f73e40..f6ad37d3 100644 --- a/docs/reference/theme_sf.html +++ b/docs/reference/theme_sf.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/theme_stars.html b/docs/reference/theme_stars.html index 6cddd99c..b935ada0 100644 --- a/docs/reference/theme_stars.html +++ b/docs/reference/theme_stars.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/docs/reference/theme_vbar.html b/docs/reference/theme_vbar.html index 7b0924db..54672d9a 100644 --- a/docs/reference/theme_vbar.html +++ b/docs/reference/theme_vbar.html @@ -80,7 +80,7 @@ simplevis - 1.8.2 + 2.0.0 diff --git a/inst/shiny/template1/data/template1.zip b/inst/shiny/template1/data/template1.zip index 87feca6971de1247231def40a23f1e27c79d78df..8f8018d88f2ed553a60c14983d6c21c8e169fe0c 100644 GIT binary patch delta 1973 zcmZ9NdpOgJAIImrxlFUPGIBXHh9Q!)iE^2!ZLTdzLXu@px#gO&=9l{s7JZRYl;jdq z&dUq`JLxH=lA*R{d}JH^Su9ge?G7LL3qJiIMS60g>8d; z9~U15Hx@DxDOHCA5VpwP6AEr&nT9Hr00e@S0r9o~hMD6O!ZSf6iC2`a@Bo5fkA4lU z28pj1na$OlJY!eC&FjVv2I}U(M*Q7%*6CyHbe$Dpmj~{qrAjd{7jb0>_Hj!u3o)J& z+8?IqaF8|Z8CZB^9cdY0dk8-4Y^gXJB8ssmjhg=?06w=}JM}?Eo0e3%)z+*GXkTHe z%)v;^>Nq|wdx17ebG&RltdjDoOy)j9+pNtQ9n>G;V+e1fNVJMA77q03q2$uSXRZPI zuDHBhFMt5mqh25$G3Rjihm+)Nqic6W})^XHT8bpHsA11jgI zU#p}=szr)3ihn`11x7|VuwQQ$YjO$Wged0lRj(sg;744%lIq{VcDDylF1<gN zg1k`^k|*2>|NIlL*Ed|priynkd?TGy%Py!J{K=|9 zzV6M9eI=?{4g?PtsBG|{y{r!}V)n3?14uSOeU@Jh*t?=(!LJqZJZrv|XW4W~vF@i1 z&S^tJ$bdmhxpUCUADPff9mCq!F-h@SZ@H6_`g2@FWSv~0afSxS*j~vNuWyWbMWW2S zL+{auS{-{$75d!M=5~yjp7HRU>Fl1DA5gpQ;aPG#ARvHTw7m4T^#T3OA?^Yli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CA`1lPE>)8n4fz*GWpe?|Z;{Qu5jSl{R4fKDdQbqub6#h@A zzxfCXQ9Rtgg9ilQxWcy-^j7%hp^YRDix2;XKp=lZPM`@9koy)7dJq9=Xb2cd1TcII z8~|eRfE36k0-DfM;2sgs`kT@s9a2Kzc@l6IY6!-Y06V^QF91yO24uhu(jklj<;cJV S;I1!7CIcFRZGMNrkbePRVqF#h diff --git a/inst/shiny/template1/make_app_vis.R b/inst/shiny/template1/make_app_vis.R index b7f957e5..61b214d7 100644 --- a/inst/shiny/template1/make_app_vis.R +++ b/inst/shiny/template1/make_app_vis.R @@ -18,9 +18,10 @@ plot_data <- data %>% filter(color == selected_color) %>% mutate(cut = stringr::str_to_sentence(cut)) %>% group_by(cut, clarity, .drop = FALSE) %>% - summarise(average_price = mean(price)) %>% + summarise(average_price = round(mean(price), 0)) %>% mutate(average_price_thousands = round(average_price / 1000, 1)) %>% - ungroup() + mutate(average_price = paste0("US$", prettyNum(average_price, big.mark = ","))) %>% + add_tip(c("cut", "clarity", "average_price")) title <- paste0("Average diamond price of colour ", selected_color, " by cut and clarity") x_title <- "Average price ($US thousands)" @@ -30,10 +31,12 @@ plot <- ggplot_hbar_col(data = plot_data, x_var = average_price_thousands, y_var = cut, col_var = clarity, + tip_var = tip_text, legend_ncol = 4, title = title, x_title = x_title, y_title = y_title) plotly::ggplotly(plot, tooltip = "text") %>% - plotly_remove_buttons() + plotly_camera() + diff --git a/inst/shiny/template1/server.R b/inst/shiny/template1/server.R index 998c8e85..8ad5202b 100644 --- a/inst/shiny/template1/server.R +++ b/inst/shiny/template1/server.R @@ -16,9 +16,10 @@ shinyServer(function(input, output, session) { filter(color == selected_color) %>% mutate(cut = stringr::str_to_sentence(cut)) %>% group_by(cut, clarity, .drop = FALSE) %>% - summarise(average_price = mean(price)) %>% + summarise(average_price = round(mean(price), 0)) %>% mutate(average_price_thousands = round(average_price / 1000, 1)) %>% - ungroup() + mutate(average_price = paste0("US$", prettyNum(average_price, big.mark = ","))) %>% + add_tip(c("cut", "clarity", "average_price")) return(plot_data) }) @@ -38,11 +39,13 @@ shinyServer(function(input, output, session) { plot <- ggplot_hbar_col(data = plot_data(), x_var = average_price_thousands, y_var = cut, - col_var = clarity, + col_var = clarity, + tip_var = tip_text, legend_ncol = 4, title = title, x_title = x_title, - y_title = y_title) + y_title = y_title, + isMobile = input$isMobile) return(plot) @@ -67,7 +70,7 @@ shinyServer(function(input, output, session) { }) output$table <- DT::renderDT( - arrange(table_data(), desc(year)), + table_data(), filter = "top", rownames = FALSE, options = list(pageLength = 5, scrollX = TRUE) diff --git a/inst/shiny/template2/data/template2.zip b/inst/shiny/template2/data/template2.zip index 42d1509148486724196344c974d2d2bc7e6ddd46..cfda020a7c60cd9064fc2bb033411143a3e68d17 100644 GIT binary patch delta 3039 zcmZuzc{tSV8XmtHW1YdLqOq1GOvaL3NJ93pWoyQgDUofgDg8c*WG9RzWS4AV_%QaY zSt^N?HCx&DC7GksIoEg2xz6*)bG_H|-tTi=_aECrR8f7Z0KE~ybX8rdztfASa-S?>R#hj=>s2}D{Fa1 ziGk5WwNfPy>jO2d{rx`schjM7)_+8(drfEcd0a(#QA=k>8ih7Nq!`;BjT+8n0kdeo@{>HnT zDygO%GV9|o#yoj(cI6_HCe2dthYf6GAp|2VGlJN zM&aU|#hlIU0;k!lSoqgaa((Kid6t@!f^0?{YtnG|PRA>M&+PQ4!TVl}HTzusu%i0r z>EL0TWtH=7rHpJ(Z&s$ra+TfByjHRtC>IDft+^&p_9uPSh>}f9UuGF7DrGRKIg*xd zTMpNMg_nR;U4^gd+D#j74|f*Gz$yAhmPFmNOYi|5IcrO5^7{aj)Ewdjb}*T56crJF zhGM{CT-=RChUwnI&EF#KO+!*5f?)HC%cxDGf}E@&^DFeb#^kVg&h2xsb4lUJxU19q zD^d@2q9 zNHOu+-L^nO`9wc)g$LBN&cOl!Id7k+-RGtuNmylE)p!C*GFHai+GQx$IAONxnSP{U z`nMC2p7c(wlD9LxFizy_7%yvFZqSBh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d=N?s^}sE{w}AjbZcq z$DzlxuBWf|SM(Hh`W`dvMV3f>VD=gD-8y{o>CmgUDyaAO4QK(r226d`oii1hF;;dn z6FPv)(#Td_5Pupm8i&>p`jU7ocdiZzXQosG@61fABYTtD`x`-~9p-Sv{Z%pGD%LR7f*e z;!%{Ec`oGWWhB3jRremPaJFGdaX9X61-@8Mf~>3UA-?0G%tVnSbd9XlNvva|z#IXr zrtWsJ25RXh0un2$wGWuB>MA3Hg*dcF4X;!-rWR*__{(br!dDzN97^nS9Wn6OSbphs zrHP2S_(iS=;ysI0{OID|VPu^E4T6bIS5>#{5KxYkJIZ!2mq-Za5%QM98|?E5 zFT8rKIVc(StU;X#!muq(%_$|^vwAT6rd&igz>%o*%1N3JZ$e*+-#$IWd2G`A<)z!6m+8T3CyucWnhzw^W6B8nx9{L2@fW3nc(WZ45&E}M|GA_<%x(u@ z|1Fr<+79pmggoMOJD>)X=MlL(09`sAqHPCoLFku^U#!0a@;3mnpCE4Hiw;1OUatTk zt``7eM8-})8aQqsDs}?;bmGLoPT)8C)MkLF(E{*tqm526{9;2+Rx}s{8fpPfPX7TG C!A=tZ diff --git a/inst/shiny/template2/global.R b/inst/shiny/template2/global.R index 746380d0..cc1085f9 100644 --- a/inst/shiny/template2/global.R +++ b/inst/shiny/template2/global.R @@ -16,5 +16,5 @@ color_vector <- sort(unique(data1$color)) metric_vector <- sort(unique(data2$indicator)) # choose a basemap (if required) -basemap <- leaflet_basemap_stack_nz() +basemap <- leaflet_basemap_nz() diff --git a/inst/shiny/template2/make_app_vis.R b/inst/shiny/template2/make_app_vis.R index a9578907..caf1b072 100644 --- a/inst/shiny/template2/make_app_vis.R +++ b/inst/shiny/template2/make_app_vis.R @@ -17,13 +17,14 @@ color_vector <- sort(unique(data1$color)) selected_color <- "E" -plot_data <- data1 %>% +plot_data <- data %>% filter(color == selected_color) %>% mutate(cut = stringr::str_to_sentence(cut)) %>% group_by(cut, clarity, .drop = FALSE) %>% - summarise(average_price = mean(price)) %>% + summarise(average_price = round(mean(price), 0)) %>% mutate(average_price_thousands = round(average_price / 1000, 1)) %>% - ungroup() + mutate(average_price = paste0("US$", prettyNum(average_price, big.mark = ","))) %>% + add_tip(c("cut", "clarity", "average_price")) title <- paste0("Average diamond price of colour ", selected_color, " by cut and clarity") x_title <- "Average price ($US thousands)" @@ -32,14 +33,15 @@ y_title <- "Cut" plot <- ggplot_hbar_col(data = plot_data, x_var = average_price_thousands, y_var = cut, - col_var = clarity, + col_var = clarity, + tip_var = tip_text, legend_ncol = 4, title = title, x_title = x_title, y_title = y_title) plotly::ggplotly(plot, tooltip = "text") %>% - plotly_remove_buttons() + plotly_camera() # make a trend map filtered by a user selected metric metric_vector <- sort(unique(data2$indicator)) @@ -58,4 +60,6 @@ leaflet_sf_col(map_data, trend_category, pal = pal, col_method = "category", - title = title) + title = title, + radius = 2) + diff --git a/inst/shiny/template2/server.R b/inst/shiny/template2/server.R index 26082e7c..a71fcf63 100644 --- a/inst/shiny/template2/server.R +++ b/inst/shiny/template2/server.R @@ -16,9 +16,10 @@ shinyServer(function(input, output, session) { filter(color == selected_color) %>% mutate(cut = stringr::str_to_sentence(cut)) %>% group_by(cut, clarity, .drop = FALSE) %>% - summarise(average_price = mean(price)) %>% + summarise(average_price = round(mean(price), 0)) %>% mutate(average_price_thousands = round(average_price / 1000, 1)) %>% - ungroup() + mutate(average_price = paste0("US$", prettyNum(average_price, big.mark = ","))) %>% + add_tip(c("cut", "clarity", "average_price")) return(plot_data) }) @@ -39,10 +40,12 @@ shinyServer(function(input, output, session) { x_var = average_price_thousands, y_var = cut, col_var = clarity, + tip_var = tip_text, legend_ncol = 4, title = title, x_title = x_title, - y_title = y_title) + y_title = y_title, + isMobile = input$isMobile) return(plot) @@ -94,7 +97,8 @@ shinyServer(function(input, output, session) { trend_category, pal = pal, col_method = "category", - title = title) + title = title, + radius = 2) } observe({ diff --git a/man/leaflet_sf.Rd b/man/leaflet_sf.Rd index d6242be1..b136c896 100644 --- a/man/leaflet_sf.Rd +++ b/man/leaflet_sf.Rd @@ -6,7 +6,7 @@ \usage{ leaflet_sf(data, pal = NULL, popup = leafpop::popupTable(sentence_spaced_colnames(data)), - radius = 1, weight = 2, opacity = 0.1, stroke = TRUE, + radius = 2, weight = 2, opacity = 0.1, stroke = TRUE, title = "[Title]", legend_digits = 1, legend_labels = "[Feature]", basemap = "light", map_id = "map") } @@ -17,7 +17,7 @@ leaflet_sf(data, pal = NULL, \item{popup}{HTML strings for use in popup. Defaults to making a leafpop::popupTable of all attribute columns in the sf object.} -\item{radius}{Radius of points. Defaults to 1.} +\item{radius}{Radius of points. Defaults to 2.} \item{weight}{Stroke border size. Defaults to 2.} diff --git a/man/leaflet_sf_col.Rd b/man/leaflet_sf_col.Rd index c52022f1..a4e98993 100644 --- a/man/leaflet_sf_col.Rd +++ b/man/leaflet_sf_col.Rd @@ -8,7 +8,7 @@ leaflet_sf_col(data, col_var, label_var = NULL, col_method = NULL, col_cuts = NULL, col_drop = FALSE, col_na_remove = FALSE, pal = NULL, pal_rev = FALSE, popup = leafpop::popupTable(sentence_spaced_colnames(data)), - radius = 1, weight = 2, opacity = 0.9, stroke = TRUE, + radius = 2, weight = 2, opacity = 0.9, stroke = TRUE, title = "[Title]", legend_digits = 1, legend_labels = NULL, basemap = "light", map_id = "map") } @@ -33,7 +33,7 @@ leaflet_sf_col(data, col_var, label_var = NULL, col_method = NULL, \item{popup}{HTML strings for use in popup. Defaults to making a leafpop::popupTable of all attribute columns in the sf object.} -\item{radius}{Radius of points. Defaults to 1.} +\item{radius}{Radius of points. Defaults to 2.} \item{weight}{Stroke border size. Defaults to 2.}