pyvista.examples.downloads.download_osmnx_graph

pyvista.examples.downloads.download_osmnx_graph#

download_osmnx_graph(load=True)[source]#

Load a simple street map from Open Street Map.

Generated from:

>>> import osmnx as ox  
>>> address = 'Holzgerlingen DE'  
>>> graph = ox.graph_from_address(
...     address, dist=500, network_type='drive'
... )  
>>> pickle.dump(
...     graph, open('osmnx_graph.p', 'wb')
... )  
Parameters:
loadbool, default: True

Load the dataset after downloading it when True. Set this to False and only the filename will be returned.

Returns:
networkx.classes.multidigraph.MultiDiGraph

An osmnx graph of the streets of Holzgerlingen, Germany.

Examples

>>> from pyvista import examples
>>> graph = examples.download_osmnx_graph()