Skip to contents

This function computes the most important flows in a spatial interaction model according to the approach outlined by J. D. Nystuen and M. F. Dacey (Nystuen & Dacey, 1961. In this work, a nodal flow is the largest flow sent from a non terminal location (based on the definition of terminals recalled in terminals()). The nodal structure is the collection of those flows. They form an oriented graph that has interesting properties. In particular each weakly connected component contains a single terminal location which can be seen as the dominant location of the component. Notice that because nodal flows are based on terminals, this function applies only to the non bipartite setting.

Usage

nd_graph(sim, definition = c("ND", "RW"), ...)

Arguments

sim

a spatial interaction model object

definition

terminal definition, either "ND" (for Nystuen & Dacey, default) or "RW" (for Rihll & Wilson), see details.

...

additional parameters

Value

a data frame describing the Nystuen and Dacey graph a.k.a. the nodal structure of a spatial interaction model

Details

In practice, the function computes first the terminals and non terminals according to either Nystuen & Dacey (1961) or Rihll and Wilson (1991). Then it extracts the nodal flows. The result of the analysis is returned as a data frame with three columns:

  • from: the index of the non terminal origin location

  • to: the index of destination location of the nodal flow of from

  • flow: the value of the nodal flow

An important aspect of the node structure is that is does not contain isolated terminals. If a location is a terminal but is never the receiver of a nodal flow it will not appear in the collection of nodal flows. It constitutes a a trivial connected component in itself.

References

Nystuen, J.D. and Dacey, M.F. (1961), "A graph theory interpretation of nodal regions", Papers and Proceedings of the Regional Science Association 7: 29–42. doi:10.1007/bf01969070

Rihll, T., and Wilson, A. (1991), "Modelling settlement structures in ancient Greece: new approaches to the polis", In City and Country in the Ancient World, Vol. 3, Edited by J. Rich and A. Wallace-Hadrill, 58–95. London: Routledge.

Examples

positions <- matrix(rnorm(10 * 2), ncol = 2)
distances <- as.matrix(dist(positions))
production <- rep(1, 10)
attractiveness <- rep(1, 10)
model <- blvim(distances, production, 1.3, 2, attractiveness, bipartite = FALSE)
nd_graph(model)
#>   from to      flow
#> 1    2  4 0.9946313
#> 2    3  4 0.9879530
#> 3    6  4 0.9961652
#> 4    7  4 0.9381573
#> 5    8  4 0.9807566
#> 6    9  4 0.9943094
nd_graph(model, "RW")
#>   from to      flow
#> 1    2  4 0.9946313
#> 2    3  4 0.9879530
#> 3    6  4 0.9961652
#> 4    7  4 0.9381573
#> 5    8  4 0.9807566
#> 6    9  4 0.9943094