Key Points
Introduction to Foundations
- Python (in Jupyter notebooks on Google Colab) is for repeatable data work; QGIS is for looking at data and making maps
- Save your own copy of each notebook, and run cells in order with Shift + Enter
- Colab sessions and files are temporary; data is always read from the web
- This module prepares you for every other module in the curriculum
Python Basics
- Run cells with Shift + Enter, in order, and read the last line of any error first
- Values have types (
int,float,str,bool); convert numbers stored as text before doing math - Lists keep values in order (from position 0); dictionaries look values up by key
-
if/elif/elsemake decisions;forloops repeat work; functions package work for reuse
Working with Data
- pandas reads tables from the web into DataFrames with
pd.read_csv(url) - Check data types first; keep identifiers such as FIPS codes as text
- Select, filter, sort, calculate and group with a few lines of code, no loops needed
- Pick the chart that answers the question, and always label it
Geospatial Python Basics
- A GeoDataFrame is a pandas DataFrame plus a
geometrycolumn;gpd.read_file()reads it from the web - Check
.crsfirst; useto_crs()to a projected CRS in meters before measuring, andset_crs()only to label missing CRS information - Attribute joins match IDs (make them the same type first); spatial joins match locations (same CRS first)
Getting Started with QGIS: Your First Map
- Add Vector Layer with the HTTP(S) protocol loads data straight from a web address.
- The attribute table holds the data behind every styling choice.
- Use Categorized for categories and Graduated for numbers, and compare classification modes.
- A Print Layout combines the map with its title, legend, scale bar, north arrow and source.
- Save the project often; export layouts as PNG or PDF.
- Check layer and project coordinate systems before measuring anything.