Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Making maps in code

Eindhoven University of Technology

Almost everything in the Built Environment happens somewhere. Buildings, streets, energy use, flood risk, heat, noise, who lives where: sooner or later your data has coordinates, and sooner or later someone asks you for a map. This section is the foundation for making that map in code, reproducibly, rather than by hand.

It grew out of the October 2026 special edition of the Coding Café, the #30DayMapChallenge kick-off, and it is written so that you can work through the challenge with it: one theme a day, 1 to 30 November. The day-by-day guide points every theme at the page that covers it.

How a map gets made

Whatever tool you use, a map in code goes through the same five steps. Most of the problems people hit are a missing or skipped step, usually the second one.

The pages

If you have one hour

  1. Read Anatomy of a map and run its code on your own laptop.

  2. Read the first half of Projections, up to The three you will meet.

  3. Make the Day 1 Points map from the starter repo, then change one thing: the colour, the data, or the question it answers.

  4. Before you share it, run the checklist at the end of Map design.

Setting up

You need either Python or R. You do not need both.

Python
R
No code
python -m venv .venv
source .venv/bin/activate          # Windows: .venv\Scripts\activate
pip install geopandas matplotlib mapclassify

Conda users: conda install -c conda-forge geopandas matplotlib mapclassify. geopandas brings shapely (geometry), pyproj (projections) and pyogrio (reading files) with it.

Further reading