Skip to content

Commit

Permalink
Check that workplace shares are not larger than one (#453)
Browse files Browse the repository at this point in the history
Co-authored-by: West Jens <Jens.West@hsl.fi>
  • Loading branch information
zptro and West Jens authored Oct 17, 2024
1 parent 3ab4b9e commit c69919a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Scripts/datahandling/zonedata.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ def __init__(self, data_dir: str, zone_numbers: numpy.array):
self.share["share_male"] = pandas.Series(0.5, self.zone_numbers)
self.nr_zones = len(self.zone_numbers)
self["population_density"] = pop / landdata["builtar"]
wp = workdata["total"]
wp = workdata.pop("total")
self["workplaces"] = wp
ShareChecker({})["Workplace shares"] = workdata.sum(axis="columns")
self["service"] = workdata["sh_serv"] * wp
self["shops"] = workdata["sh_shop"] * wp
self["logistics"] = workdata["sh_logi"] * wp
Expand Down

0 comments on commit c69919a

Please sign in to comment.