Functions & Formulae

Each applied formula has its own function page, with a signature, implementations, and tests.

Spatial accessibility index function from provider capacity, population and travel times

a(S_j, P_k, d_ij, f) = A_i

Maps the capacity of each provider location, the population of each residential location and the travel time or distance between every pair to an accessibility score for each residential location, in providers per head of population. Wang 2012 writes the family in one form, A_i equal to the sum over providers of S_j f(d_ij) divided by the sum over population locations of P_k f(d_kj), with f a distance decay function, so each provider's capacity is shared among the people who can reach it and each resident collects the shares within reach. HE-FM-ACCS-001 is the two-step floating catchment area (2SFCA) method of Luo and Wang, in which f is 1 within a threshold travel time and 0 beyond it, and HE-FM-ACCS-002 is the gravity form with a population demand adjustment, in which f is a negative power of travel time; Luo and Wang show that the first is a special case of the second. Both are written out for the article's two practices and three neighbourhoods, and HE-CF-ACCS-001 and HE-CF-ACCS-002 run them for any number of sites. A count of providers over the residents of one bordered area is a plain ratio of the form of HE-FM-ACR-001 and is not drafted; the time cost borne by residents who travel further is HE-FM-PTC-001, and equity of use relative to need is HE-FN-HEQ-001. Notation follows the Accessibility article.

  • Two-step floating catchment area accessibility for two practices and three neighbourhoods

    R_X = S_X / ((d_1X <= d_0) * P_1 + (d_2X <= d_0) * P_2 + (d_3X <= d_0) * P_3); R_Y = S_Y / ((d_1Y <= d_0) * P_1 + (d_2Y <= d_0) * P_2 + (d_3Y <= d_0) * P_3); A_1 = (d_1X <= d_0) * R_X + (d_1Y <= d_0) * R_Y; A_2 = (d_2X <= d_0) * R_X + (d_2Y <= d_0) * R_Y; A_3 = (d_3X <= d_0) * R_X + (d_3Y <= d_0) * R_Y

    Step one divides each practice's full-time-equivalent GPs by the population of the neighbourhoods within the threshold travel time d_0 of it, giving the practice's supply ratio. Step two gives each neighbourhood the sum of the supply ratios of the practices within d_0 of it. Each comparison such as (d_1X <= d_0) is 1 when the travel time is within the threshold and 0 otherwise, so a neighbourhood outside a practice's catchment adds nothing to its denominator and takes nothing from its ratio. The result is in GPs per head of population, and the article reports it per 10,000 people. Neighbourhoods A, B and C of the article are 1, 2 and 3 here; more practices or neighbourhoods add terms of the same pattern, which HE-CF-ACCS-001 computes for any number of sites.

  • Gravity accessibility with a population demand adjustment for two practices and three neighbourhoods

    V_X = P_1 * d_1X^(-beta) + P_2 * d_2X^(-beta) + P_3 * d_3X^(-beta); V_Y = P_1 * d_1Y^(-beta) + P_2 * d_2Y^(-beta) + P_3 * d_3Y^(-beta); A_1 = S_X * d_1X^(-beta) / V_X + S_Y * d_1Y^(-beta) / V_Y; A_2 = S_X * d_2X^(-beta) / V_X + S_Y * d_2Y^(-beta) / V_Y; A_3 = S_X * d_3X^(-beta) / V_X + S_Y * d_3Y^(-beta) / V_Y

    Each practice's demand potential adds the neighbourhood populations weighted by travel time raised to the power minus beta, so nearer residents compete for its GPs more than distant ones. Each neighbourhood's score adds, over both practices, the practice's GPs weighted the same way and divided by its demand potential. Every practice counts, with no threshold, and a larger beta makes distance matter more. It is Wang's equation 1 and Luo and Wang's equation 6, the improved gravity model that Guagliardo attributes to Joseph and Bantock, written for the article's example, and HE-CF-ACCS-002 computes it for any number of sites. The scores are in GPs per head, and their population-weighted mean equals total GPs over total population, as for HE-FM-ACCS-001.