Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documents #38

Merged
merged 8 commits into from
Aug 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Suggests:
osmextract,
stplanr,
dplyr,
rgdal
rgdal,
tmap
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A very handy package for the vignette 👍 for using it. I was being overly cautious before but truth is adding as Suggests does not affect 'installability'.

VignetteBuilder: knitr
Config/testthat/edition: 3
8 changes: 4 additions & 4 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' @examples
#' names(dem_lisbon_raster)
#' raster::plot(dem_lisbon_raster)
#' plot(lisbon_road_segments["Avg_Slope"], add = TRUE)
#' plot(lisbon_road_network["Avg_Slope"], add = TRUE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big thumbs up, way better.

"dem_lisbon_raster"

#' Road segments in Lisbon
Expand All @@ -21,9 +21,9 @@
#' @source Produced by ESRI's
#' [3D Analyst extension](https://pro.arcgis.com/en/pro-app/help/analysis/)
#' @examples
#' names(lisbon_road_segments)
#' plot(lisbon_road_segments["Avg_Slope"])
"lisbon_road_segments"
#' names(lisbon_road_network)
#' plot(lisbon_road_network["Avg_Slope"])
"lisbon_road_network"

#' A road segment in Lisbon, Portugal
#'
Expand Down
6 changes: 3 additions & 3 deletions R/slopes.R
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ slope_matrices = function(m_xyz_split, fun = slope_matrix_weighted, ...) {
#' @importFrom methods is
#' @export
#' @examples
#' routes = lisbon_road_segments[1:3, ]
#' routes = lisbon_road_network[1:3, ]
#' dem = dem_lisbon_raster
#' (s = slope_raster(routes, dem))
#' cor(routes$Avg_Slope, s)
Expand Down Expand Up @@ -209,7 +209,7 @@ slope_xyz = function(route_xyz, fun = slope_matrix_weighted, lonlat = TRUE) {
#' @inheritParams slope_matrix
#' @export
#' @examples
#' m = sf::st_coordinates(lisbon_road_segments[1, ])
#' m = sf::st_coordinates(lisbon_road_network[1, ])
#' dem = dem_lisbon_raster
#' elevation_extract(m, dem)
#' elevation_extract(m, dem, method = "simple")
Expand Down Expand Up @@ -245,7 +245,7 @@ elevation_extract = function(m,
#' @export
#' @examples
#' library(sf)
#' routes = lisbon_road_segments[204, ]
#' routes = lisbon_road_network[204, ]
#' dem = dem_lisbon_raster
#' (r3d = elevation_add(routes, dem))
#' sf::st_z_range(routes)
Expand Down
255 changes: 177 additions & 78 deletions README.Rmd

Large diffs are not rendered by default.

Loading