Package 'moveability'

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

Help Index


castlemaine

Description

'Silicate' ('SC') format street network data for Castlemaine, Australia.

Format

List of data.frame objects representing different components of the street network


castlemaine_attr

Description

Centres of activity attraction in Castlemaing, Australia.

Format

A data.frame of point locations of activity attractors


castlemaine_green

Description

Polygons of all green spaces in Castlemaine, Australia

Format

sf-format data.frame of green space polygons


get_attractors

Description

Get points of trip attraction

Usage

get_attractors(bbox, quiet = FALSE)

Arguments

bbox

Bounding box for which green space polygons are to be extracted.

quiet

If TRUE, dump progress information to screen.


get_green_space

Description

Get polygons of all green areas for a given location

Usage

get_green_space(bbox, quiet = FALSE)

Arguments

bbox

Bounding box for which green space polygons are to be extracted.

quiet

If TRUE, dump progress information to screen.

Value

An sf-format data.frame of polygons representing all green areas.


move_statistics

Description

Alias for move_stats

Usage

move_statistics(graph, from, green_polys, d_threshold = 1,
  quiet = TRUE)

Arguments

graph

Street network in dodgr format obtained through applying dodgr::weight_streetnet to an osmdata_sc object.

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 TRUE, dump progress information to screen.

Value

Vector of moveability values for each point in from, with moveability quantified as $m.

Examples

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 statisics

move_stats

Description

Calculate vector of moveability statistics for a given input street network.

Usage

move_stats(graph, from, green_polys, activity_points, d_threshold = 1,
  quiet = FALSE)

Arguments

graph

Street network in dodgr format obtained through applying dodgr::weight_streetnet to an osmdata_sc object.

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 TRUE, dump progress information to screen.

Value

Vector of moveability values for each point in from, with moveability quantified as $m.

Examples

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 statisics

moveability.

Description

Moveability statistics for any specified city.

Calculate moveability statistics for a specified city

Usage

moveability(streetnet = NULL, from = NULL, green_polys = NULL,
  activity_points, d_threshold = 1, mode = "foot", quiet = FALSE)

Arguments

streetnet

Pre-downloaded or prepared street network in either osmdata_sc or dodgr_sc format.

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 TRUE, dump progress information to screen.

Value

Nothing (open interactive map)

Examples

m <- moveability (streetnet = castlemaine, green_polys = castlemaine_green,
                  activity_points = castlemaine_attr)

moveability_to_lines

Description

Project moveability statistics from moveability on to lines of street network.

Usage

moveability_to_lines(m, streetnet)

Arguments

m

Result of moveability function

streetnet

Street network in either sf, osmdata or dodgr format.

Value

sf collection of LINE objects of the street network, with moveability statistics averaged between the two end points of each line segment.

Examples

m <- moveability (streetnet = castlemaine, green_polys = castlemaine_green,
                  activity_points = castlemaine_attr)
l <- moveability_to_lines (m = m, streetnet = castlemaine)

moveability_to_polygons

Description

Project moveability statistics from moveability on to polygonal blocks of street network, in order to plot polygons rather than points.

Usage

moveability_to_polygons(m, streetnet)

Arguments

m

Result of moveability function

streetnet

Street network in either sf, osmdata or dodgr format.

Value

sf collection of POLYGON objects corresponding to street blocks, with average moveability statistics from all points defining that block.

Note

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.

Examples

m <- moveability (streetnet = castlemaine, green_polys = castlemaine_green,
                  activity_points = castlemaine_attr)
p <- moveability_to_polygons (m = m, streetnet = castlemaine)