diff --git a/gis/urban_growth/urban_growth/model.py b/gis/urban_growth/urban_growth/model.py index 98a530b4..212d1d20 100644 --- a/gis/urban_growth/urban_growth/model.py +++ b/gis/urban_growth/urban_growth/model.py @@ -2,6 +2,7 @@ import mesa import numpy as np +from mesa import DataCollector from .space import City @@ -54,9 +55,10 @@ def __init__( cell.model = self self.schedule.add(cell) - self.initialize_data_collector( + self.datacollector = DataCollector( model_reporters={"Percentage Urbanized": "pct_urbanized"} ) + self.datacollector.collect(self) @property def pct_urbanized(self) -> float: