Skip to content

Commit

Permalink
use weights of trips for histograms
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Jul 29, 2024
1 parent c81beda commit 55b9012
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion matsim/scenariogen/data/run_create_ref_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def mode_share_distance_distribution(trips, dist_groups):

for m in set(trips.main_mode):
df = trips[trips.main_mode == m]
hist, bins = np.histogram(df.gis_length * 1000, bins=x)
hist, bins = np.histogram(df.gis_length * 1000, bins=x, weights=df.t_weight)

yout = lowess(hist, x[:-1], frac=0.05, is_sorted=True, return_sorted=False, it=0)
data[m] = np.maximum(0, yout)
Expand Down

0 comments on commit 55b9012

Please sign in to comment.