Intro to Python

Python is widely used for urban analytics, data science, and spatial analysis. Most of the tools in this course are Python packages, and most code examples you’ll find online are written in Python.

Setup

Alternative: Jupyter Notebook

Jupyter Notebook is similar but runs on your machine. Useful if you want to work offline or without a Google account, though it requires a bit more setup.

Long Term: VS Code

VS Code is a full development environment. It means installing Python, managing dependencies, and configuring an editor, but it’s what most professionals use day to day. Worth moving to once you’re comfortable with the basics.

When you get stuck

LLMs (ChatGPT, Claude) are genuinely useful for understanding code, debugging errors, and working through problems. Use them actively: ask why something works, not just for the answer. If you copy code you don’t understand, you’ll stall the moment something breaks.

Coding is learned by trying things, getting stuck, and figuring things out. That part hasn’t changed.

Post questions or ask for help on GitHub Discussions.

Resources

  • DataCamp: Python Data Fundamentals: Interactive and exercise-based. You write code in the browser and get immediate feedback.
  • CS50’s Introduction to Programming with Python: Harvard’s free video lecture series with weekly problem sets. More structured and academic.
  • Python Documentation: The official reference. Not a tutorial, but useful once you need to look up how a specific function or module works.
  • Cityseer Examples: The Cityseer Examples website with a basic introduction to Python for geospatial and examples of different ways to use the Cityseer package for centrality and accessibility analysis.