Skip to content (Press Enter)
Javier Ladino

Javier Ladino

{Data/Design/Engineer}

  • Home.
  • About
  • Portfolio
  • ES πŸ‡¨πŸ‡΄
  • FR πŸ‡«πŸ‡·
DataViz

Discover the urban networks in Nantes with OSMnx and Python πŸšΆπŸš—πŸš²

OSMnx is an incredible Python library that allows us to analyze and visualize urban networks using OpenStreetMap data. In this case, we will use OSMnx to explore the pedestrian, road, and bike networks in the beautiful city of Nantes.

Here is the code we will use to obtain and visualize these networks:

import osmnx as ox
import matplotlib.pyplot as plt

# Get the city of Nantes and its pedestrian network
place_name = "Nantes, France"
graph = ox.graph_from_place(place_name, network_type='walk')

# Create a figure and axis for the pedestrian network
fig, ax = ox.plot_graph(graph, figsize=(10, 10), node_color='b', node_size=30, edge_color='gray')
ax.set_title('Pedestrian Network of Nantes')

# Show the figure
plt.show()

# Get the road network of Nantes for cars
graph = ox.graph_from_place(place_name, network_type='drive')

# Create a figure and axis for the road network
fig, ax = ox.plot_graph(graph, figsize=(10, 10), node_color='b', node_size=30, edge_color='gray')
ax.set_title('Road Network of Nantes for Cars')

# Show the figure
plt.show()

# Get the bike network of Nantes
graph = ox.graph_from_place(place_name, network_type='bike')

# Create a figure and axis for the bike network
fig, ax = ox.plot_graph(graph, figsize=(10, 10), node_color='b', node_size=30, edge_color='gray')
ax.set_title('Bike Network of Nantes')

# Show the figure
plt.show()

This code uses OSMnx to obtain the pedestrian, road, and bike networks of Nantes. Each network is then displayed separately using ox.plot_graph, allowing us to appreciate the connectivity and available routes for each mode of transportation.

We hope this visualization inspires you to explore the various urban networks in Nantes and promote sustainable and environmentally friendly modes of transportation! 🌍🌱

You can use this post as a base and add any additional details or supplementary information you wish to highlight. Enjoy exploring the urban networks of Nantes with OSMnx and Python!

Related Projects

πŸ—ΊοΈ 30 days of maps β€” #30DayMapChallenge 2025

November 8, 2025

Into space for biodiversity! Deciphering Lemu NGE satellite data with Python

August 23, 2024

Urban mobility & energy: designing a COβ‚‚ dashboard for Nantes, Rennes, and Niort

September 3, 2025
© Copyright 2025 Javier Ladino. Perfect Portfolio | Developed By Rara Theme. Powered by WordPress.