access.fca.fca_ratio¶
- access.fca.fca_ratio(demand_df, supply_df, demand_cost_df, supply_cost_df, max_cost, demand_index='geoid', demand_name='demand', supply_index='geoid', supply_name='supply', demand_cost_origin='origin', demand_cost_dest='dest', demand_cost_name='cost', supply_cost_origin='origin', supply_cost_dest='dest', supply_cost_name='cost', weight_fn=None, normalize=False, noise='quiet')[source]¶
Calculation of the floating catchment accessibility ratio, from DataFrames with precomputed distances. This is accomplished through two calls of the
Access.access.weighted_catchment()
method.- Parameters:
- demand_dfpandas.DataFrame
The origins dataframe, containing a location index and a total demand.
- supply_dfpandas.DataFrame
The origins dataframe, containing a location index and level of supply
- demand_cost_dfpandas.DataFrame
This dataframe contains a link between neighboring demand locations, and a cost between them.
- supply_cost_dfpandas.DataFrame
This dataframe contains a link between neighboring supply locations, and a cost between them.
- max_costfloat
This is the maximum cost to consider in the weighted sum; note that it applies along with the weight function.
- demand_indexstr
is the name of the column that holds the IDs.
- demand_namestr
is the name of the column of demand that holds the aggregate demand at a location.
- supply_indexstr
is the name of the column that holds the IDs.
- supply_namestr
is the name of the column of supply_df that holds the aggregate supply at a location.
- demand_cost_originstr
The column name of the index locations – this is what will be grouped.
- demand_cost_deststr
The column name of the index locations – this is what will be grouped.
- demand_cost_namestr
The column name of the travel cost.
- supply_cost_originstr
The column name of the index locations – this is what will be grouped.
- supply_cost_deststr
The column name of the index locations – this is what will be grouped.
- supply_cost_namestr
The column name of the travel cost.
- weight_fnfunction
This function will weight the value of resources/facilities, as a function of the raw cost.
- normalizebool
True to normalize the FCA series, by default False.
- noisestr
Default ‘quiet’, otherwise gives messages that indicate potential issues.
- Returns:
- accesspandas.Series
A – potentially-weighted – access ratio.