two_step_floating_catchment

site.SiteSolutionSet.two_step_floating_catchment(
    supply_col,
    catchment_size=None,
    distance_decay=None,
    sort_by=None,
    solution_rank=1,
    site_names=None,
    site_indices=None,
    matrix=None,
    demand=None,
    per_capita=1,
    return_site_ratios=False,
)

Two-step floating catchment area (2SFCA) accessibility for one chosen solution.

Resolves the solution’s selected sites and delegates to SiteProblem.two_step_floating_catchment(), which does the actual step-1/step-2 calculation. Unlike site_allocation_summary(), this cannot use problem_df (which only carries each region’s nearest site and cost, not the full per-site travel-cost row 2SFCA needs for every site’s catchment) so it goes back to the problem’s travel frame instead.

Parameters

Name Type Description Default
supply_col str Column in candidate_sites holding each site’s supply quantity (e.g. number of GPs, beds, weekly appointment slots). required
catchment_size float Classic 2SFCA’s hard catchment threshold d0, in the travel matrix’s registered units. Mutually exclusive with distance_decay – exactly one of the two must be given. See SiteProblem.two_step_floating_catchment for details. None
distance_decay list of (float, float) or dict Enhanced 2SFCA step-decay bands or a continuous decay kernel, forwarded as-is. See SiteProblem.two_step_floating_catchment. None
sort_by str None
solution_rank int 1
site_names list None
site_indices list Solution selection, as in site_allocation_summary. Priority is site_indices > site_names > sort_by/solution_rank. None
matrix str Label of a secondary travel matrix registered via add_secondary_travel_matrix(). Scores accessibility under that matrix’s travel costs instead of the primary matrix’s. None
demand str Label of a secondary demand scenario registered via add_secondary_demand(). Scores accessibility under that scenario’s demand instead of the primary demand data. None
per_capita float Multiplier applied to the accessibility column, e.g. 1_000 to express supply per 1,000 head instead of raw supply units per head. 1
return_site_ratios bool If True, also return the step-1 per-site table. False

Returns

Name Type Description
pandas.DataFrame Per demand region, indexed by demand location ID: accessibility (supply units per head, x per_capita), n_sites_in_catchment, demand.
pandas.DataFrame Only if return_site_ratios=True. Per site, indexed by site name: supply, catchment_demand, n_regions_in_catchment, ratio.

See Also

SiteProblem.two_step_floating_catchment : The underlying calculation, usable directly on the full candidate site set without needing a solved solution.

Back to top