Learn R Programming

REAT (version 1.2.1)

hansen: Hansen accessibility

Description

Calculating the Hansen accessibility for given origins and destinations

Usage

hansen(od_dataset, origins, destinations, attrac, dist, gamma = 1, lambda = -2, atype = "pow", dtype = "pow", gamma2 = NULL, lambda2 = NULL, dist_const = 0, dist_max = NULL, extract_local = FALSE, accnorm = FALSE, check_df = TRUE)

Arguments

od_dataset
an interaction matrix which is a data.frame containing the origins, destinations, the distances between them and a size variable for the opportunities of the destinations
origins
the column in the interaction matrix od_dataset containing the origins
destinations
the column in the interaction matrix od_dataset containing the destinations
attrac
the column in the interaction matrix od_dataset containing the "attractivity" variable of the destinations (e.g. no. of opportunities)
dist
the column in the interaction matrix od_dataset containing the transport costs (e.g. travelling time, distance)
gamma
a single numeric value for the exponential weighting ($\gamma$) of size (default: 1)
lambda
a single numeric value for the exponential weighting ($\lambda$) of distance (transport costs, default: -2)
atype
Type of attractivity weighting function: atype = "pow" (power function), atype = "exp" (exponential function) or atype = "logistic" (default: atype = "pow")
dtype
Type of distance weighting function: dtype = "pow" (power function), dtype = "exp" (exponential function) or dtype = "logistic" (default: dtype = "pow")
gamma2
if atype = "logistic" a second $\gamma$ parameter is needed
lambda2
if dtype = "logistic" a second $\lambda$ parameter is needed
dist_const
a numeric value of a constant to be added to the transport costs (e.g. 1)
dist_max
a numeric value of a maximal value of transport costs for the opportunities to be recognized
extract_local
logical argument that indicates if the start points should be included in the analysis or not (if $i=j$). Default value: extract_local = FALSE
accnorm
logical argument that indicates if the Hansen accessibility should be standardized
check_df
logical argument that indicates if the given dataset is checked for correct input, only for internal use, should not be deselected (default: TRUE)

Value

Returns a data frame with the origins and the accessibility values (column accessibility).

Details

The Hansen accessibility (Hansen 1959) can be regarded as a potential model of spatial interaction. From a theoretical perspective, the accessibility of a region or zone $i$, ($A_i$), can be seen as the sum of all utilities of every opportunity $O_{j}$ outgoing from given starting points and weighted by the distance to them ($d_{ij}$) (Orpana/Lampinen 2003). Originally the weighting function of distance is not explicitly stated and the "attractivities" (e.g. size of the activity at the destinations) is not weighted($A_{i} = \sum_{j}{O_{j} f(d_{ij})}$). This specification is relaxed is this case, so both variables can be weighted by a power, exponential or logistic function. If accnorm = TRUE, the Hansen accessibility is standardized by weighting the non-standardized values by the sum of all opportunities without regarding transport costs; the standardized Hansen accessibility has a range between 0 and 1.

References

Aoyama, Y./Murphy, J. T./Hanson, S. (2011): “Key Concepts in Economic Geography”. London : SAGE.

Hansen, W. G. (1959): “How Accessibility Shapes Land Use”. In: Journal of the American Institute of Planners, 25, 2, p. 73-76.

Orpana, T./Lampinen, J. (2003): “Building spatial choice models from aggregate data”. In: Journal of Regional Science, 43, 2, p. 319-347.

See Also

huff

Examples

Run this code
# Hansen accessibility for grocery stores in Freiburg: 
data(Freiburg1)
# Distance matrix for grocery stores in Freiburg
data(Freiburg2)
# Statistical districs of Freiburg
hansen (Freiburg1, "district", "store", "salesarea", "distance", gamma = 1, lambda = -2)
# Computes the Hansen accessibility from the statistical districts of Freiburg
# regarding the grocery stores and their sizes

# Hansen accessibility for psychotherapists in South Lower Saxony: 
data(health1)
# Health service locations in South Lower Saxony
data(health5)
# Distance matrix for health service locations and subregions in South Lower Saxony
psycho <- merge (health5, health1[health1$type == "psych",], 
by.x = "location_to", by.y = "location")
# Extracting psychotherapists
psycho <- psycho[sample(nrow(psycho), 10), ]
# Random sample of 10 rows (psychotherapists)
hansen_psych <- hansen(psycho, "region_from", "location_to", attrac = 1, 
"drvtime", lambda = -0.11, dtype = "exp", dist_const = 5)
# Hansen accessibility for psychotherapists with an exponential distance decay function
# with a weighting of lambda = -0.11

Run the code above in your browser using DataLab