pytspl.io.data_loaders.transportation_loader
Module for preprocessing and loading transportation network datasets for analysis.
Attributes
Functions
|
List the available transportation datasets. |
|
Read the flow data of the transportation dataset. |
|
Load the transportation dataset and return the simplicial complex |
|
Load the Chicago sketch dataset straight from the files. |
Module Contents
- pytspl.io.data_loaders.transportation_loader.DATA_FOLDER
- pytspl.io.data_loaders.transportation_loader.CHICAGO_SKETCH_DATA_FOLDER
- pytspl.io.data_loaders.transportation_loader.METADATA_ROWS = 8
- pytspl.io.data_loaders.transportation_loader.list_transportation_datasets() list[source]
List the available transportation datasets.
- Returns:
list: The list of available transportation datasets.
- pytspl.io.data_loaders.transportation_loader.load_flow_transportation(dataset: str, edges: list) pandas.DataFrame[source]
Read the flow data of the transportation dataset.
- Args:
dataset (str): The name of the dataset. edges (list): The list of edges in the simplicial complex.
- Returns:
pd.DataFrame: The flow data of the transportation dataset. Returns an empty dictionary if the flow data is not found.
- pytspl.io.data_loaders.transportation_loader.load_transportation_dataset(dataset: str) tuple[source]
Load the transportation dataset and return the simplicial complex and coordinates.
- Args:
dataset (str): The name of the dataset.
- Returns:
- tuple:
SimplicialComplex: The simplicial complex of the dataset. dict: The coordinates of the nodes. If the coordinates do not exist, the coordinates are generated using spring layout. dict: The flow data of the dataset. If the flow data does not exist, an empty dictionary is returned.