API reference

Network feature instantiation

spaghetti.Network([in_data, vertex_sig, …])

Spatially-constrained network representation and analytical functionality.

spaghetti.PointPattern([in_data, …])

A stub point pattern class used to store a point pattern.

Network feature extraction and creation

spaghetti.extract_component(net, component_id)

Extract a single component from a network object.

spaghetti.spanning_tree(net[, method, …])

Extract a minimum or maximum spanning tree from a network.

spaghetti.element_as_gdf(net[, vertices, …])

Return a geopandas.GeoDataFrame of network elements.

spaghetti.regular_lattice(bounds, nh[, nv, …])

Generate a regular lattice of line segments (libpysal.cg.Chain objects).

Save and load a network

spaghetti.Network.savenetwork(self, filename)

Save a network to disk as a binary file.


Load a network from a binary file saved on disk.