| Title: | Moveability statistics for any specified city |
|---|---|
| Description: | Moveability statistics for any specified city. |
| Authors: | Mark Padgham [aut, cre], Angus Johnson [cph] (Original author of included code for polygon clipping) |
| Maintainer: | Mark Padgham <[email protected]> |
| License: | GPL-3 |
| Version: | 0.0.0.013 |
| Built: | 2026-06-05 11:58:59 UTC |
| Source: | https://github.com/moveability/moveability |
'Silicate' ('SC') format street network data for Castlemaine, Australia.
List of data.frame objects representing different components of the
street network
Centres of activity attraction in Castlemaing, Australia.
A data.frame of point locations of activity attractors
Polygons of all green spaces in Castlemaine, Australia
sf-format data.frame of green space polygons
Get points of trip attraction
get_attractors(bbox, quiet = FALSE)get_attractors(bbox, quiet = FALSE)
bbox |
Bounding box for which green space polygons are to be extracted. |
quiet |
If |
Get polygons of all green areas for a given location
get_green_space(bbox, quiet = FALSE)get_green_space(bbox, quiet = FALSE)
bbox |
Bounding box for which green space polygons are to be extracted. |
quiet |
If |
An sf-format data.frame of polygons representing all green
areas.
Alias for move_stats
move_statistics(graph, from, green_polys, d_threshold = 1, quiet = TRUE)move_statistics(graph, from, green_polys, d_threshold = 1, quiet = TRUE)
graph |
Street network in dodgr format obtained through applying
|
from |
Vector of points from which moveability statistics are to be be calculated. |
green_polys |
Polygons of green space obtained from get_green_space |
d_threshold |
Distance threshold below which distances are to be aggreagted (in kilometres). |
quiet |
If |
Vector of moveability values for each point in from, with
moveability quantified as $m.
graph <- dodgr::weight_streetnet (castlemaine) green_polys <- castlemaine_green # green polygon data included with package activity_points <- castlemaine_attr # activity attractors included with package from <- sample (graph$.vx0, size = 100) d <- move_stats (graph, green_polys = green_polys, activity_points = activity_points, from = from) # d is a `data.frame` of the coordinates of all `from` points and # correponding moveability statisicsgraph <- dodgr::weight_streetnet (castlemaine) green_polys <- castlemaine_green # green polygon data included with package activity_points <- castlemaine_attr # activity attractors included with package from <- sample (graph$.vx0, size = 100) d <- move_stats (graph, green_polys = green_polys, activity_points = activity_points, from = from) # d is a `data.frame` of the coordinates of all `from` points and # correponding moveability statisics
Calculate vector of moveability statistics for a given input street network.
move_stats(graph, from, green_polys, activity_points, d_threshold = 1, quiet = FALSE)move_stats(graph, from, green_polys, activity_points, d_threshold = 1, quiet = FALSE)
graph |
Street network in dodgr format obtained through applying
|
from |
Vector of points from which moveability statistics are to be be calculated. |
green_polys |
Polygons of green space obtained from get_green_space |
activity_points |
Points of activity obtained from get_attractors. |
d_threshold |
Distance threshold below which distances are to be aggreagted (in kilometres). |
quiet |
If |
Vector of moveability values for each point in from, with
moveability quantified as $m.
graph <- dodgr::weight_streetnet (castlemaine) green_polys <- castlemaine_green # green polygon data included with package activity_points <- castlemaine_attr # activity attractors included with package from <- sample (graph$.vx0, size = 100) d <- move_stats (graph, green_polys = green_polys, activity_points = activity_points, from = from) # d is a `data.frame` of the coordinates of all `from` points and # correponding moveability statisicsgraph <- dodgr::weight_streetnet (castlemaine) green_polys <- castlemaine_green # green polygon data included with package activity_points <- castlemaine_attr # activity attractors included with package from <- sample (graph$.vx0, size = 100) d <- move_stats (graph, green_polys = green_polys, activity_points = activity_points, from = from) # d is a `data.frame` of the coordinates of all `from` points and # correponding moveability statisics
Moveability statistics for any specified city.
Calculate moveability statistics for a specified city
moveability(streetnet = NULL, from = NULL, green_polys = NULL, activity_points, d_threshold = 1, mode = "foot", quiet = FALSE)moveability(streetnet = NULL, from = NULL, green_polys = NULL, activity_points, d_threshold = 1, mode = "foot", quiet = FALSE)
streetnet |
Pre-downloaded or prepared street network in either
|
from |
If provided, calculate moveability statistics only at these points (given as a vector of OSM IDs). |
green_polys |
Polygons of green space obtained from get_green_space |
activity_points |
Points of activity obtained from get_attractors. |
d_threshold |
Distance threshold below which distances are to be aggreagted (in kilometres). |
mode |
Mode of transport: either "foot" or "bicycle" |
quiet |
If |
Nothing (open interactive map)
m <- moveability (streetnet = castlemaine, green_polys = castlemaine_green, activity_points = castlemaine_attr)m <- moveability (streetnet = castlemaine, green_polys = castlemaine_green, activity_points = castlemaine_attr)
Project moveability statistics from moveability on to lines of street network.
moveability_to_lines(m, streetnet)moveability_to_lines(m, streetnet)
m |
Result of moveability function |
streetnet |
Street network in either sf, osmdata or dodgr format. |
sf collection of LINE objects of the street network,
with moveability statistics averaged between the two end points of each line
segment.
m <- moveability (streetnet = castlemaine, green_polys = castlemaine_green, activity_points = castlemaine_attr) l <- moveability_to_lines (m = m, streetnet = castlemaine)m <- moveability (streetnet = castlemaine, green_polys = castlemaine_green, activity_points = castlemaine_attr) l <- moveability_to_lines (m = m, streetnet = castlemaine)
Project moveability statistics from moveability on to polygonal blocks of street network, in order to plot polygons rather than points.
moveability_to_polygons(m, streetnet)moveability_to_polygons(m, streetnet)
m |
Result of moveability function |
streetnet |
Street network in either sf, osmdata or dodgr format. |
sf collection of POLYGON objects corresponding to street
blocks, with average moveability statistics from all points defining that
block.
This function may take a long time to execute, because of the calculation of fundamental cycles in the street network graph used to identify street blocks.
m <- moveability (streetnet = castlemaine, green_polys = castlemaine_green, activity_points = castlemaine_attr) p <- moveability_to_polygons (m = m, streetnet = castlemaine)m <- moveability (streetnet = castlemaine, green_polys = castlemaine_green, activity_points = castlemaine_attr) p <- moveability_to_polygons (m = m, streetnet = castlemaine)