Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Zones

A zone is a named geographic area. Zones are used to identify the home zone of each household and the origin/destination zone of each trip, which is in turn used throughout the pipeline and in results analysis — for example to generate an origin-destination matrix at the zone level, to calibrate the simulation against zone-level survey data, or to aggregate results by zone.

Pymetropolis supports up to five independent zone levels, labeled level1 to level5, each represented by its own MetroFile (e.g. ZonesLevel1File). A level is only used if it is actually defined; you do not need to define all five.

Custom zones

The simplest way to define a level is to provide your own geospatial file (with a geometry column and, optionally, a zone_id and a name column) with the zones.custom_files.level1 (through level5) parameter, using CustomZonesLevel1Step (through CustomZonesLevel5Step). This works for any of the five levels.

French zones

For France, FrenchZonesStep (enabled with zones.france = true) automatically defines four levels from official administrative data:

  • Level 1: Region
  • Level 2: Département
  • Level 3: INSEE commune
  • Level 4: IRIS

This leaves level 5 free to be used for a custom zoning, e.g. with zones.custom_files.level5.

You are not required to use the French zones: you can always define all five levels yourself with custom zone files instead.