brokenspoke_analyzer.core.compute module#

Define functions to run SQL scripts.

Define functions to run the various SQL scripts performing the operations to compute the BNA scores.

class brokenspoke_analyzer.core.compute.Access(name, first=0.0, second=0.0, third=0.0, max_score=1)#

Bases: object

Define the Access parts.

first: float = 0.0#
max_score: int = 1#
name: str#
second: float = 0.0#
third: float = 0.0#
class brokenspoke_analyzer.core.compute.BlockRoad(buffer=15, min_length=30)#

Bases: object

Define the Block Road items.

buffer: int = 15#
min_length: int = 30#
class brokenspoke_analyzer.core.compute.PathConstraint(min_length=4800, min_bbox=3300)#

Bases: object

Define the Path Constraints.

min_bbox: int = 3300#
min_length: int = 4800#
class brokenspoke_analyzer.core.compute.Score(total=100, people=15, opportunity=20, core_services=20, retail=15, recreation=15, transit=15)#

Bases: object

Define the Score parts.

core_services: int = 20#
opportunity: int = 20#
people: int = 15#
recreation: int = 15#
retail: int = 15#
total: int = 100#
transit: int = 15#
class brokenspoke_analyzer.core.compute.Tolerance(colleges=100, community_centers=50, doctors=50, dentists=50, hospitals=50, pharmacies=50, parks=50, retail=50, transit=75, universities=150)#

Bases: object

Cluster tolerances given in units of output_srid.

colleges: int = 100#
community_centers: int = 50#
dentists: int = 50#
doctors: int = 50#
hospitals: int = 50#
parks: int = 50#
pharmacies: int = 50#
retail: int = 50#
transit: int = 75#
universities: int = 150#
brokenspoke_analyzer.core.compute.all(database_url, sql_script_dir, output_srid, state_default_speed, city_default_speed, import_jobs, buffer=2680, max_trip_distance=2680)#

Compute all features.

Return type:

None

brokenspoke_analyzer.core.compute.conectivity(engine, sql_script_dir, output_srid, import_jobs, max_trip_distance=2680)#

Compute BNA connectivity scores.

Return type:

None

brokenspoke_analyzer.core.compute.execute_sqlfile_with_substitutions(engine, sqlfile, bind_params=None)#

Execute SQL statements with substitutions.

Return type:

None

brokenspoke_analyzer.core.compute.features(engine, sql_script_dir, output_srid, boundary_buffer)#

Compute the BNA features.

Return type:

None

brokenspoke_analyzer.core.compute.stress(engine, sql_script_dir, state_default_speed, city_default_speed)#

Compute stress levels.

Return type:

None