Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

market_access.py

get_mcp_dests(inH, destinations, makeset=True)

Description: Get indices from the raster for use in mcp.find_costs.

Parameters:

Returns:


name_mcp_dests(inH, destinations)

Description: Label destinations with a name matching MCP indices when duplicates are removed.

Parameters:

Returns:


generate_roads_lc_friction(lc_file, sel_roads, lc_travel_table=None, min_lc_val=0.01, min_road_speed=0.01, speed_col='speed', resolution=100, out_file='')

Description: Combine a landcover dataset and a road network to create a friction surface.

Parameters:

Returns:


generate_lc_friction(lc_file, lc_travel_table=None, min_val=0.01, resolution=100)

Description: Convert a landcover dataset to a friction surface based on a travel speed table.

Parameters:

Returns:


generate_road_friction(inH, sel_roads, no_road_speed=0.01, speed_col='speed', resolution=100)

Description: Create a raster of network travel times from a road network measured as seconds to cross each cell.

Parameters:

Returns:


calculate_travel_time(inH, mcp, destinations, out_raster='')

Description: Calculate travel time from all cells to the set of destinations using an MCP graph.

Parameters:

Returns:


generate_feature_vectors(network_r, mcp, inH, threshold, featIdx='tempID', verbose=True)

Description: Generate individual market sheds for each feature in the input dataset.

Parameters:

Returns:


generate_market_sheds(inR, inH, out_file='', verbose=True, factor=1000, bandIdx=0, column_id=None, reclass=True)

Description: Identify pixel-level maps of market sheds based on travel time.

Parameters:

Returns:


generate_market_sheds_old(img, mcp, inH, out_file='', verbose=True)

Description: Identify pixel-level maps of market sheds based on travel time (legacy approach).

Parameters:

Returns:


summarize_travel_time_populations(popR, ttR, dests, mcp, zonalD, out_tt_file='', calc_thresh=True, calc_weighted=True, thresholds=[30, 60, 120, 180, 240])

Description: Summarize population according to travel time thresholds and weighted travel time.

Parameters:

Returns:


calculate_gravity(inH, mcp, dests, gravity_col, outfile='', decayVals=[0.01, 0.005, 0.001, 0.0007701635, 0.0003850818, 0.0001925409, 0.0000962704, 0.0000385082, 0.00001])

Description: Run a gravity model over a friction surface to evaluate access to destinations.

Parameters:

Returns: