From 5cf0be99f86f69ddaa902e0a51ee75f392e52da0 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Mon, 2 Nov 2020 14:12:47 +0800 Subject: [PATCH] #14 Bump deps, update vignette spatial * mapview 2.9.4 fixes popup, use github until CRAN is updated * pin dep vers --- DESCRIPTION | 8 +++++--- vignettes/spatial.Rmd | 13 +++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ad07608d..c53f5ead 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -59,12 +59,12 @@ Suggests: DT (>= 0.9), ggplot2 (>= 3.2.1), knitr (>= 1.26), - lattice, + lattice (>= 0.20-41), leaflet (>= 2.0.3), listviewer (>= 3.0.0), leafpop (>= 0.0.5), - leafem, - mapview (>= 2.9.0), + leafem (>= 0.1.3), + mapview (>= 2.9.4), rmarkdown (>= 1.17), roxygen2 (>= 7.1.0), sf (>= 0.9-5), @@ -72,6 +72,8 @@ Suggests: usethis (>= 1.6.0), vcr (>= 0.5.4), webshot (>= 0.5.2) +Remotes: + r-spatial/mapview VignetteBuilder: knitr RdMacros: diff --git a/vignettes/spatial.Rmd b/vignettes/spatial.Rmd index 42f51e9b..9c6f9017 100644 --- a/vignettes/spatial.Rmd +++ b/vignettes/spatial.Rmd @@ -109,11 +109,9 @@ geo_sf_point <- geo_wkt %>% sf::st_as_sf(wkt="point_location_point_gps") # ODK Collect captures WGS84 (EPSG:4326) sf::st_crs(geo_sf_point) <- 4326 # Mapview using sf -# Remove the popup=NULL to get full attribute table as popup # See also further information under heading "Outlook" mapview::mapview(geo_sf_point, col.regions = sf::sf.colors(10), - popup = NULL, map.types = c("Esri.WorldShadedRelief", "OpenTopoMap.AU")) # GGplot using sf ggplot2::ggplot() + @@ -141,7 +139,7 @@ geo_sf_line <- geo_wkt %>% sf::st_as_sf(wkt="path_location_path_gps") # ODK Collect captures WGS84 (EPSG:4326) sf::st_crs(geo_sf_line) <- 4326 # Mapview using sf -mapview::mapview(geo_sf_line, col.regions = sf::sf.colors(10), popup = NULL) +mapview::mapview(geo_sf_line, col.regions = sf::sf.colors(10)) # GGplot using sf ggplot2::ggplot() + ggplot2::geom_sf(data = geo_sf_line, ggplot2::aes(fill = device_id)) @@ -166,7 +164,7 @@ geo_sf_poly <- geo_wkt %>% sf::st_as_sf(wkt="shape_location_shape_gps") # ODK Collect captures WGS84 (EPSG:4326) sf::st_crs(geo_sf_poly) <- 4326 # Mapview using sf -mapview::mapview(geo_sf_poly, col.regions = sf::sf.colors(10), popup = NULL) +mapview::mapview(geo_sf_poly, col.regions = sf::sf.colors(10)) # GGplot using sf ggplot2::ggplot() + ggplot2::geom_sf(data = geo_sf_poly, ggplot2::aes(fill = device_id)) @@ -194,8 +192,8 @@ deserves a spatial mention. Review the options for [mapview popups](https://r-spatial.github.io/mapview/articles/articles/mapview_04-popups.html) which are turned off in this quick demo, and the whole -[mapview](https://r-spatial.github.io/mapview/index.html) homepage for a comprehensive -overview of mapview. +[mapview](https://r-spatial.github.io/mapview/index.html) homepage for a +comprehensive overview of mapview. There are several other good entry points for all things R and spatial, including but not limited to: @@ -206,6 +204,9 @@ including but not limited to: by [Barry Rowlingson](http://barry.rowlingson.com/) * [GIS with R](https://www.jessesadler.com/post/gis-with-r-intro/) by [Jesse Sadler](https://www.jessesadler.com/page/cv/) +* GIS and mapping by [Olivier Gimenez](https://oliviergimenez.github.io/): + [Slides](https://oliviergimenez.github.io/intro_spatialR/) and + [code](https://github.com/oliviergimenez/intro_spatialR) The above list of examples and resources is far from comprehensive. Feel free to [contribute or suggest](https://github.com/ropensci/ruODK/issues)