Summary and Schedule
New to Python or GIS? Start here. This module teaches the foundations that every other module in the curriculum builds on: how to run Python notebooks in Google Colab, how to work with tables and charts, how to handle maps and coordinate systems in Python, and how to make a first map in QGIS. No experience with programming or GIS is needed.
| Episode | What you will learn | Tools |
|---|---|---|
| Introduction to Foundations | The tools of the curriculum, working in Google Colab, and where to go next | Concepts |
| Python Basics | Running cells, variables, text, lists, dictionaries, decisions, loops and functions | Python notebooks (6) |
| Working with Data | Tables with pandas and charts with matplotlib | Python notebooks (2) |
| Geospatial Python Basics | Map layers with GeoPandas, coordinate reference systems, and attribute and spatial joins | Python notebooks (3) |
| Getting Started with QGIS | Loading data from the web, styling layers, a choropleth map and a finished layout | QGIS |
Each Python notebook takes 15 to 25 minutes, covers one idea, reads its data straight from the web, and ends with an exercise and its solution.
Prerequisites
- A Google account, to open the notebooks in Google Colab
- A computer where you can install QGIS, for the last episode
- Nothing else: no programming or GIS experience is assumed
The Setup page is the central setup guide for the whole curriculum: Google Colab, installing QGIS, and getting a Census API key.
This module is part of Enabling the Geospatial Turn in the Social Sciences, a set of training modules developed at Purdue University with support from the National Science Foundation.
| Setup Instructions | Download files required for the lesson | |
| Duration: 00h 00m | 1. Introduction to Foundations |
What do I need to know before starting the other modules? Which tools does this curriculum use, and what is each one for? How do Google Colab notebooks work? |
| Duration: 00h 30m | 2. Python Basics |
How do I write and run Python code? How does Python store numbers, text and collections of values? How do I make decisions, repeat work and reuse code? |
| Duration: 03h 00m | 3. Working with Data |
How do I load a table of data into Python? How do I select, filter, sort and summarize rows and columns? How do I turn a table into a clear chart? |
| Duration: 04h 10m | 4. Geospatial Python Basics |
How does Python store and map geographic data? What is a coordinate reference system, and why does it matter for measuring? How do I combine a table with a map layer, or two layers with each other? |
| Duration: 05h 55m | 5. Getting Started with QGIS: Your First Map |
How do I load spatial data into QGIS, including directly from the
web? How do I explore a layer’s attributes? How can I style point data by category and polygon data by value? How do I create and export a finished map layout? |
| Duration: 07h 40m | Finish |
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
This page is the central setup guide for the whole curriculum. Other modules link here instead of repeating these steps. Everything is free.
| You need | For | Section |
|---|---|---|
| A Google account | Running notebooks in Google Colab | Part 1 |
| QGIS installed on a computer | QGIS episodes (this module, Data Collection, Data Visualization, Case Studies) | Part 2 |
| A Census API key | Notebooks that download Census data (Data Collection, Data Analysis, Case Studies) | Part 3 |
Part 1: Google Colab
Colab runs Jupyter notebooks in your web browser, so there is nothing to install.
- Sign in to a Google account (any Gmail account works).
- Click a notebook link in any episode’s Notebooks table. It opens in Colab.
- Choose File > Save a copy in Drive so your changes are kept.
- Run cells from top to bottom: click a cell and press Shift + Enter.
- If Colab warns that the notebook was not written by Google, click Run anyway.
All notebooks read their data straight from the web, so you never
need to download data by hand. pandas, matplotlib and GeoPandas come
installed in Colab; when a notebook needs anything else, its first cell
installs it with !pip install.
Part 2: Install QGIS
QGIS is a free, open source Geographic Information System for viewing, analyzing and mapping spatial data.
- Go to https://qgis.org and click Download.
- Choose the Long Term Release (LTR) version, the
most stable one.
-
Windows: the standalone installer
(
.msi) -
macOS: the macOS installer (
.dmg). The first time you open QGIS, you may need to right-click the app and choose Open to get past the security warning. - Linux: follow the instructions for your distribution on the QGIS download page
-
Windows: the standalone installer
(
- Run the installer and keep the default settings.
- Open QGIS Desktop (not “QGIS with GRASS” or other variants, if several are listed).
The QGIS window

| Part | What it does |
|---|---|
| Menu bar | All commands, organized by topic (Project, Layer, Vector, Raster and so on) |
| Toolbars | Shortcuts for common tools such as pan, zoom and identify |
| Browser panel | Your files, databases and web sources, including XYZ Tiles basemaps |
| Layers panel | The layers in your project. Layers at the top are drawn on top. |
| Map view (canvas) | Where the map is displayed |
| Status bar | Coordinates under the cursor, map scale and the project’s coordinate system (EPSG code) |
If a panel is missing, turn it back on with View > Panels.
Part 3: Get a Census API key
The U.S. Census Bureau’s data API refuses requests without a key. Every learner needs their own key. It is free and takes a few minutes.
- Go to https://api.census.gov/data/key_signup.html.
- Enter your organization (for example, Purdue University) and your email address, and agree to the terms.
- Check your email. The key arrives within a few minutes.
- Click the activation link in the email. The key does not work until you do.
- Paste the key where a notebook asks for it.
Treat the key like a password: do not post it online or leave it in a notebook you share.
Optional: Python on your own computer
Colab is the recommended way to follow the curriculum. If you prefer to work offline, install Anaconda and create an environment with the main libraries:
BASH
conda create -n spatialturn -c conda-forge python=3.11 pandas geopandas matplotlib mapclassify jupyterlab
conda activate spatialturn
jupyter lab
Then download a notebook from Colab (File > Download > Download .ipynb) and open it in JupyterLab. The data is still read from the web, so you need an internet connection.
Troubleshooting
| Problem | Fix |
|---|---|
A Colab cell gives NameError
|
A cell above it was skipped; use Runtime > Run before |
A Colab cell gives ModuleNotFoundError
|
Run the !pip install cell at the top of the notebook
first |
| Colab disconnected and forgot everything | Reconnect, then Runtime > Run all |
| QGIS will not open on macOS | Right-click the app, choose Open, then confirm |
| The Browser or Layers panel is missing | View > Panels, then tick the panel |
| A layer loaded from a web address shows nothing | Right-click the layer and choose Zoom to Layer; check that the address was pasted completely |
| The basemap is blank | Check your internet connection; XYZ basemaps need to be online |
| The Census API returns “Missing Key” or “Invalid Key” | Check that you clicked the activation link, and that the key was pasted completely |