Skip to content

Commit

Permalink
#14 Bump deps, update vignette spatial
Browse files Browse the repository at this point in the history
* mapview 2.9.4 fixes popup, use github until CRAN is updated
* pin dep vers
  • Loading branch information
Florian Mayer authored and Florian Mayer committed Nov 2, 2020
1 parent 8844e5c commit 5cf0be9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
8 changes: 5 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,21 @@ 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),
testthat (>= 2.3.2),
usethis (>= 1.6.0),
vcr (>= 0.5.4),
webshot (>= 0.5.2)
Remotes:
r-spatial/mapview
VignetteBuilder:
knitr
RdMacros:
Expand Down
13 changes: 7 additions & 6 deletions vignettes/spatial.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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() +
Expand Down Expand Up @@ -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))
Expand All @@ -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))
Expand Down Expand Up @@ -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:
Expand All @@ -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)
Expand Down

0 comments on commit 5cf0be9

Please sign in to comment.