diff --git a/_modules/transport_performance/gtfs/multi_validation.html b/_modules/transport_performance/gtfs/multi_validation.html
index 25bd6733..9699f8fe 100644
--- a/_modules/transport_performance/gtfs/multi_validation.html
+++ b/_modules/transport_performance/gtfs/multi_validation.html
@@ -94,6 +94,7 @@
Source code for transport_performance.gtfs.multi_validation
import
glob
import os
import warnings
+
from copy import deepcopy
from geopandas import GeoDataFrame
import numpy as np
@@ -675,6 +676,13 @@
Source code for transport_performance.gtfs.multi_validation
# combine stop tables
parts = []
for inst in self.instances:
+
# copy the gtfs instance in case data is manipulated
+
inst = deepcopy(inst)
+
# create a synthesized stop_code column if it does not exist
+
if "stop_code" not in inst.feed.stops.columns:
+
inst.feed.stops["stop_code"] = [
+
f"ID{sid}" for sid in inst.feed.stops["stop_id"]
+
]
subset = inst.feed.stops[
["stop_lat", "stop_lon", "stop_name", "stop_id", "stop_code"]
].copy()
@@ -683,6 +691,8 @@
Source code for transport_performance.gtfs.multi_validation
subset = subset[subset.stop_id.isin(valid_ids)]
subset["gtfs_path"] = os.path.basename(inst.gtfs_path)
parts.append(subset)
+ # clean up copied instance
+ del inst
all_stops = pd.concat(parts)