polaris.prepare.supply_tables.populate_tables.Populator#

class polaris.prepare.supply_tables.populate_tables.Populator(supply_path)#

Bases: object

__init__(supply_path) None#

Methods

__init__(supply_path)

add_ev_chargers(nrel_api_key[, max_dist, ...])

Adds EV Chargers

add_locations(control_totals, census_api_key)

add_parking([facility_types, sample_rate])

Adds Parking facilities from data coming from OpenStreetMap

add_zoning_system(model_area, zone_level, ...)

Create zoning system based on census subdivisions.

create_network([simplification_parameters, ...])

Attributes

__init__(supply_path) None#
add_zoning_system(model_area: GeoDataFrame, zone_level: str, census_api_key: str, year: int = 2021)#

Create zoning system based on census subdivisions. Population data is extracted from The ACS 5 year. For mode details see datamade/census

Args:

model_area (GeoDataFrame): GeoDataFrame containing polygons with the model area zone_level (str): Census subdivision level to use for zoning -> tracts or block_groups year (int): Year of the population data. Defaults to 2021 census_api_key (str): API key for the census.

add_ev_chargers(nrel_api_key: str, max_dist=100, clustering_attempts=5)#

Adds EV Chargers

Args:

nrel_api_key (str): API key for the NREL API to retrieve location of EV chargers. max_dist (float): clustering_attempts (int):

add_parking(facility_types: tuple = ('surface', 'underground', 'multi-storey', 'rooftop'), sample_rate: float = 1.0)#

Adds Parking facilities from data coming from OpenStreetMap

Args:

facility_types (str): Facility type according to OSM

add_locations(control_totals: GeoDataFrame, census_api_key: str, residential_sample_rate=0.05, other_sample_rate=1.0)#
create_network(simplification_parameters={'accessibility_level': 'zone', 'keep_transit_links': True, 'maximum_network_capacity': False, 'simplify': True}, imputation_parameters={'algorithm': 'knn', 'max_iter': 10}) NetworkConstructor#
property state_counties#