ox_orientation_entropy: Street-orientation entropy

View source: R/metrics.R

ox_orientation_entropyR Documentation

Street-orientation entropy

Description

Shannon entropy (in nats) of the distribution of edge compass bearings, binned into equal sectors. Higher values indicate a more disordered (organic) network; lower values a more ordered (gridiron) one.

Usage

ox_orientation_entropy(x, num_bins = 36)

Arguments

x

An osm_graph or a numeric vector of bearings (degrees), e.g. from ox_bearings().

num_bins

Number of equal bearing sectors over ⁠[0, 360)⁠. Default 36.

Value

A numeric scalar (entropy in nats).

Examples

g <- example_osm_graph()
ox_orientation_entropy(g)

osmnxr documentation built on Oct. 20, 2026, 1:07 a.m.