I try to extract a graph for a distance matrix, but idk if my data is wrong or other one.
If a person can help me…
Code :
df = pd.read_csv('mat1.csv')
def clean_coordinate(value):
try:
value = str(value).replace(',', '.')
return float(value)
except ValueError:
return None
df['x'] = df['x'].apply(clean_coordinate)
df['y'] = df['y'].apply(clean_coordinate)
north = df['x'].max()
south = df['x'].min()
east = df['y'].max()
west = df['y'].min()
bbox = [north, south, east, west]
graph = ox.graph_from_bbox(*bbox, network_type='drive')
Error :
“FutureWarning: The north
, south
, east
, and west
parameters are deprecated and will be removed in the v2.0.0 release. Use the bbox
parameter instead. See the OSMnx v2 migration guide: https://github.com/gboeing/osmnx/issues/1123
G = ox.graph_from_bbox(*bbox, network_type=’drive’)”
New contributor
Etienne Jolivel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2