Distances on Directed Graphs in R

update iso fn docs for #258

+129 -31
+1 -1
DESCRIPTION
··· 1 1 Package: dodgr 2 2 Title: Distances on Directed Graphs 3 - Version: 0.4.2.039 3 + Version: 0.4.2.040 4 4 Authors@R: c( 5 5 person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre")), 6 6 person("Andreas", "Petutschnig", role = "aut"),
+66 -13
R/iso.R
··· 1 1 #' Calculate isodistance contours from specified points. 2 2 #' 3 + #' @description Calculates isodistances from input `data.frame` objects 4 + #' (`graph`), which must minimally contain three columns of `from`, `to`, and 5 + #' `d` or `dist`. If an additional column named `weight` or `wt` is present, 6 + #' shortest paths are calculated according to values specified in that column, 7 + #' while resultant isodistances are calculated from the `d` or `dist` column. 8 + #' That is, the paths tracing isodistances from any point will be calculated 9 + #' according to the minimal total sum of `weight` values (if present), while 10 + #' reported isodistances will be total sums of `dist` values. 11 + #' 12 + #' Graphs derived from Open Street Map street networks, via the 13 + #' \link{weight_streetnet} function, have columns labelled `d`, `d_weighted`, 14 + #' `time`, and `time_weighted`. For these inputs, isodistances are always 15 + #' routed using `d_weighted` (or `t_weighted` for times), while final 16 + #' isodistances are sums of values of `d` (or `t` for times)- that is, of 17 + #' un-weighted distances or times - along those paths. 18 + #' 3 19 #' Function is fully vectorized to calculate accept vectors of central points 4 - #' and vectors defining multiple isodistances. 20 + #' and vectors defining multiple isodistances. Calculations use by default 21 + #' parallel computation with the maximal number of available cores or threads. 22 + #' This number can be reduced by specifying a value via 23 + #' `RcppParallel::setThreadOptions (numThreads = <desired_number>)`. 5 24 #' 6 25 #' @param graph `data.frame` or equivalent object representing the network 7 26 #' graph. For `dodgr` street networks, this may be a network derived from either ··· 28 47 #' and `dlim` value(s). The isodistance contours are given as `id` values and 29 48 #' associated coordinates of the series of points from each `from` point at the 30 49 #' specified isodistances. 31 - #' 32 - #' @note Isodists are calculated by default using parallel computation with the 33 - #' maximal number of available cores or threads. This number can be reduced by 34 - #' specifying a value via 35 - #' `RcppParallel::setThreadOptions (numThreads = <desired_number>)`. 36 50 #' 37 51 #' @family iso 38 52 #' @export ··· 136 150 137 151 m_iso_calculate <- memoise::memoise (iso_calculate) 138 152 139 - #' Calculate isochrone contours from specified points. 153 + #' @title Calculate isochrone contours from specified points. 154 + #' 155 + #' @description Calculates isochrones from input `data.frame` objects 156 + #' (`graph`), which must minimally contain three columns of `from`, `to`, and 157 + #' `t` or `time`. If an additional column named `t_weight` or `t_wt` is 158 + #' present, fastest paths are calculated according to values specified in that 159 + #' column, while resultant isochrones are calculated from the `t` or `time` 160 + #' column. That is, the paths tracing isochrones from any point will be 161 + #' calculated according to the minimal total sum of `t_weight` values (if 162 + #' present), while reported isochrones will be total sums of `time` values. 163 + #' 164 + #' Graphs derived from Open Street Map street networks, via the 165 + #' \link{weight_streetnet} function, have columns labelled `d`, `d_weighted`, 166 + #' `time`, and `time_weighted`. For these inputs, isochrones are always routed 167 + #' using `t_weighted`, while final isochrones are sums of values of `t` - that 168 + #' is, of un-weighted distances or times - along those paths. 140 169 #' 141 170 #' Function is fully vectorized to calculate accept vectors of central points 142 - #' and vectors defining multiple isochrone thresholds. 171 + #' and vectors defining multiple isochrones. Calculations use by default 172 + #' parallel computation with the maximal number of available cores or threads. 173 + #' This number can be reduced by specifying a value via 174 + #' `RcppParallel::setThreadOptions (numThreads = <desired_number>)`. 143 175 #' 144 176 #' @inherit dodgr_isodists 145 177 #' ··· 200 232 return (res) 201 233 } 202 234 203 - #' Calculate isodistance or isochrone contours from specified points. 235 + #' @title Calculate isodistance or isochrone contours from specified points. 236 + #' 237 + #' 238 + #' @description Returns lists of all network vertices contained within 239 + #' isodistance or isochrone contours. Input objects must be `data.frame` 240 + #' objects (`graph`), which must minimally contain three columns of `from`, 241 + #' `to`, and `d` or `dist`. If an additional column named `weight` or `wt` is 242 + #' present, iso contours are evaluate via shortest paths calculated according 243 + #' to values specified in that column, while resultant values of iso contours 244 + #' are calculated from the `d` or `dist` column. That is, the paths tracing iso 245 + #' contours from any point will be calculated according to the minimal total 246 + #' sum of `weight` values (if present), while reported iso contours will be 247 + #' total sums of `dist` values. 248 + #' 249 + #' Graphs derived from Open Street Map street networks, via the 250 + #' \link{weight_streetnet} function, have columns labelled `d`, `d_weighted`, 251 + #' `time`, and `time_weighted`. For these inputs, iso contours are always 252 + #' routed using `d_weighted` (or `t_weighted` for times), while final iso 253 + #' contours reflect sums of values of `d` (or `t` for times) - that is, of 254 + #' un-weighted distances or times - along those paths. 204 255 #' 205 - #' Returns lists of all network vertices contained within the contours. Function 206 - #' is fully vectorized to calculate accept vectors of central points and vectors 207 - #' defining multiple isochrone thresholds. Provide one or more `dlim` values for 208 - #' isodistances, or one or more `tlim` values for isochrones. 256 + #' Function is fully vectorized to accept vectors of central points and vectors 257 + #' defining multiple isochrone or isodistance thresholds. Provide one or more 258 + #' `dlim` values for isodistances, or one or more `tlim` values for isochrones. 259 + #' Calculations use by default parallel computation with the maximal number of 260 + #' available cores or threads. This number can be reduced by specifying a value 261 + #' via `RcppParallel::setThreadOptions (numThreads = <desired_number>)`. 209 262 #' 210 263 #' @inheritParams dodgr_isodists 211 264 #'
+1 -1
codemeta.json
··· 11 11 "codeRepository": "https://github.com/UrbanAnalyst/dodgr", 12 12 "issueTracker": "https://github.com/UrbanAnalyst/dodgr/issues", 13 13 "license": "https://spdx.org/licenses/GPL-3.0", 14 - "version": "0.4.2.039", 14 + "version": "0.4.2.040", 15 15 "programmingLanguage": { 16 16 "@type": "ComputerLanguage", 17 17 "name": "R",
+18 -6
man/dodgr_isochrones.Rd
··· 50 50 specifying a value via \verb{RcppParallel::setThreadOptions (numThreads = <desired_number>)}. 51 51 } 52 52 \description{ 53 + Calculates isochrones from input \code{data.frame} objects 54 + (\code{graph}), which must minimally contain three columns of \code{from}, \code{to}, and 55 + \code{t} or \code{time}. If an additional column named \code{t_weight} or \code{t_wt} is 56 + present, fastest paths are calculated according to values specified in that 57 + column, while resultant isochrones are calculated from the \code{t} or \code{time} 58 + column. That is, the paths tracing isochrones from any point will be 59 + calculated according to the minimal total sum of \code{t_weight} values (if 60 + present), while reported isochrones will be total sums of \code{time} values. 61 + 62 + Graphs derived from Open Street Map street networks, via the 63 + \link{weight_streetnet} function, have columns labelled \code{d}, \code{d_weighted}, 64 + \code{time}, and \code{time_weighted}. For these inputs, isochrones are always routed 65 + using \code{t_weighted}, while final isochrones are sums of values of \code{t} - that 66 + is, of un-weighted distances or times - along those paths. 67 + 53 68 Function is fully vectorized to calculate accept vectors of central points 54 - and vectors defining multiple isochrone thresholds. 55 - } 56 - \note{ 57 - Isodists are calculated by default using parallel computation with the 58 - maximal number of available cores or threads. This number can be reduced by 59 - specifying a value via 69 + and vectors defining multiple isochrones. Calculations use by default 70 + parallel computation with the maximal number of available cores or threads. 71 + This number can be reduced by specifying a value via 60 72 \verb{RcppParallel::setThreadOptions (numThreads = <desired_number>)}. 61 73 } 62 74 \examples{
+19 -6
man/dodgr_isodists.Rd
··· 50 50 specified isodistances. 51 51 } 52 52 \description{ 53 + Calculates isodistances from input \code{data.frame} objects 54 + (\code{graph}), which must minimally contain three columns of \code{from}, \code{to}, and 55 + \code{d} or \code{dist}. If an additional column named \code{weight} or \code{wt} is present, 56 + shortest paths are calculated according to values specified in that column, 57 + while resultant isodistances are calculated from the \code{d} or \code{dist} column. 58 + That is, the paths tracing isodistances from any point will be calculated 59 + according to the minimal total sum of \code{weight} values (if present), while 60 + reported isodistances will be total sums of \code{dist} values. 61 + 62 + Graphs derived from Open Street Map street networks, via the 63 + \link{weight_streetnet} function, have columns labelled \code{d}, \code{d_weighted}, 64 + \code{time}, and \code{time_weighted}. For these inputs, isodistances are always 65 + routed using \code{d_weighted} (or \code{t_weighted} for times), while final 66 + isodistances are sums of values of \code{d} (or \code{t} for times)- that is, of 67 + un-weighted distances or times - along those paths. 68 + 53 69 Function is fully vectorized to calculate accept vectors of central points 54 - and vectors defining multiple isodistances. 55 - } 56 - \note{ 57 - Isodists are calculated by default using parallel computation with the 58 - maximal number of available cores or threads. This number can be reduced by 59 - specifying a value via 70 + and vectors defining multiple isodistances. Calculations use by default 71 + parallel computation with the maximal number of available cores or threads. 72 + This number can be reduced by specifying a value via 60 73 \verb{RcppParallel::setThreadOptions (numThreads = <desired_number>)}. 61 74 } 62 75 \examples{
+24 -4
man/dodgr_isoverts.Rd
··· 35 35 specifying a value via \verb{RcppParallel::setThreadOptions (numThreads = <desired_number>)}. 36 36 } 37 37 \description{ 38 - Returns lists of all network vertices contained within the contours. Function 39 - is fully vectorized to calculate accept vectors of central points and vectors 40 - defining multiple isochrone thresholds. Provide one or more \code{dlim} values for 41 - isodistances, or one or more \code{tlim} values for isochrones. 38 + Returns lists of all network vertices contained within 39 + isodistance or isochrone contours. Input objects must be \code{data.frame} 40 + objects (\code{graph}), which must minimally contain three columns of \code{from}, 41 + \code{to}, and \code{d} or \code{dist}. If an additional column named \code{weight} or \code{wt} is 42 + present, iso contours are evaluate via shortest paths calculated according 43 + to values specified in that column, while resultant values of iso contours 44 + are calculated from the \code{d} or \code{dist} column. That is, the paths tracing iso 45 + contours from any point will be calculated according to the minimal total 46 + sum of \code{weight} values (if present), while reported iso contours will be 47 + total sums of \code{dist} values. 48 + 49 + Graphs derived from Open Street Map street networks, via the 50 + \link{weight_streetnet} function, have columns labelled \code{d}, \code{d_weighted}, 51 + \code{time}, and \code{time_weighted}. For these inputs, iso contours are always 52 + routed using \code{d_weighted} (or \code{t_weighted} for times), while final iso 53 + contours reflect sums of values of \code{d} (or \code{t} for times) - that is, of 54 + un-weighted distances or times - along those paths. 55 + 56 + Function is fully vectorized to accept vectors of central points and vectors 57 + defining multiple isochrone or isodistance thresholds. Provide one or more 58 + \code{dlim} values for isodistances, or one or more \code{tlim} values for isochrones. 59 + Calculations use by default parallel computation with the maximal number of 60 + available cores or threads. This number can be reduced by specifying a value 61 + via \verb{RcppParallel::setThreadOptions (numThreads = <desired_number>)}. 42 62 } 43 63 \examples{ 44 64 \dontrun{