Skip to content

Commit

Permalink
update dashboards and ref data, age and economic status is now includ…
Browse files Browse the repository at this point in the history
…ed in the reference data
  • Loading branch information
rakow committed Aug 5, 2024
1 parent 555e225 commit 99b3b72
Show file tree
Hide file tree
Showing 8 changed files with 728 additions and 278 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ input/network.osm: $(NETWORK)
--tf accept-ways highway=motorway,motorway_link,motorway_junction,trunk,trunk_link,primary,primary_link\
--used-node --wb input/network-germany.osm.pbf

# put the 3 above networks together and remove raia
# put the 3 above networks together and remove railway
$(osmosis) --rb file=input/network-germany.osm.pbf --rb file=input/network-coarse.osm.pbf --rb file=input/network-detailed.osm.pbf\
--merge --merge\
--tag-transform file=input/remove-railway.xml\
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<!--<version>14.0-PR1452</version>-->

<!-- snapshot == not recommended: rather use PR-labelled release!-->
<version>16.0-PR3381</version>
<version>2025.0-PR3388</version>
</parent>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public List<Dashboard> getDashboards(Config config, SimWrapper simWrapper) {
"lausitz_mode_share.csv",
"lausitz_mode_share_per_dist.csv",
"lausitz_mode_users.csv")
.withGroupedRefData("lausitz_mode_share_per_group_dist_ref.csv", "age")
.withGroupedRefData("lausitz_mode_share_per_group_dist_ref.csv", "age", "economic_status")
.withDistanceDistribution("lausitz_mode_share_distance_distribution.csv")
);
}
}
3 changes: 1 addition & 2 deletions src/main/python/create_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def person_filter(df):

# Groups will be shown on the dashboard
df["age"] = cut(df.age, [0, 12, 18, 25, 35, 66, np.inf])
df["hh_income"] = cut(df.income, [0, 500, 900, 1500, 2000, 2600, 3000, 3600, 4600, 5600, np.inf])

# Only weekdays are considered, with persons present in their home region
return df[df.present_on_day & (df.reporting_day <= 5)]
Expand All @@ -41,7 +40,7 @@ def trip_filter(df):
"/Volumes/Untitled/B3_Lokal-Datensatzpaket/CSV",
person_filter, trip_filter,
run_create_ref_data.InvalidHandling.REMOVE_TRIPS,
ref_groups=["age", "hh_income", "economic_status"]
ref_groups=["age", "economic_status"]
)

print("Filtered %s persons" % len(r.persons))
Expand Down
62 changes: 31 additions & 31 deletions src/main/resources/lausitz_mode_share.csv
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
dist_group,main_mode,mean_dist,share
0 - 1000,bike,741.7474152768164,0.05431618817899002
0 - 1000,car,845.2047065363095,0.031216669310203
0 - 1000,pt,503.9569413263069,0.0012298417638100443
0 - 1000,ride,798.8045427222489,0.01929390934129713
0 - 1000,walk,474.8462693693281,0.14568353330391315
1000 - 2000,bike,1644.2686306579485,0.01912094472020174
1000 - 2000,car,1664.6974637289466,0.04206126416523887
1000 - 2000,pt,1769.9848721595795,0.006125610783078046
1000 - 2000,ride,1695.6202104840554,0.015018450003780185
1000 - 2000,walk,1781.56327180136,0.028682645671379056
2000 - 5000,bike,3415.967452046967,0.025207557865234546
2000 - 5000,car,3821.2329823444597,0.13695546693420932
2000 - 5000,pt,3715.77927121702,0.011575801348651667
2000 - 5000,ride,3336.405564477932,0.03633788006858987
2000 - 5000,walk,3058.339137223546,0.01911150073233698
5000 - 10000,bike,6635.65436876184,0.011838556537851376
5000 - 10000,car,7311.064045237122,0.11269186948089517
5000 - 10000,pt,6979.744659157714,0.013102503056468777
5000 - 10000,ride,6898.4939502130765,0.027491496179970917
5000 - 10000,walk,6657.462194056846,0.006142216096671607
10000 - 20000,bike,14378.984336238063,0.00281739136837012
10000 - 20000,car,14576.783406018267,0.0755031637087224
10000 - 20000,pt,13429.023672194808,0.01383155988361684
10000 - 20000,ride,14240.788705878334,0.020277335207750966
10000 - 20000,walk,12940.0,0.0001990871342660644
20000+,bike,37248.118594095315,0.003061190266223855
20000+,car,47805.15415602558,0.09845227912097768
20000+,pt,41088.975762937975,0.0036358034320222465
20000+,ride,68027.0017296671,0.01901828433527827
20000+,walk,,0.0
dist_group,main_mode,share
0 - 1000,bike,0.05431618817899002
0 - 1000,car,0.031216669310203
0 - 1000,pt,0.0012298417638100443
0 - 1000,ride,0.01929390934129713
0 - 1000,walk,0.14568353330391315
1000 - 2000,bike,0.01912094472020174
1000 - 2000,car,0.04206126416523887
1000 - 2000,pt,0.006125610783078046
1000 - 2000,ride,0.015018450003780185
1000 - 2000,walk,0.028682645671379056
2000 - 5000,bike,0.025207557865234546
2000 - 5000,car,0.13695546693420932
2000 - 5000,pt,0.011575801348651667
2000 - 5000,ride,0.03633788006858987
2000 - 5000,walk,0.01911150073233698
5000 - 10000,bike,0.011838556537851376
5000 - 10000,car,0.11269186948089517
5000 - 10000,pt,0.013102503056468777
5000 - 10000,ride,0.027491496179970917
5000 - 10000,walk,0.006142216096671607
10000 - 20000,bike,0.00281739136837012
10000 - 20000,car,0.0755031637087224
10000 - 20000,pt,0.01383155988361684
10000 - 20000,ride,0.020277335207750966
10000 - 20000,walk,0.0001990871342660644
20000+,bike,0.003061190266223855
20000+,car,0.09845227912097768
20000+,pt,0.0036358034320222465
20000+,ride,0.01901828433527827
20000+,walk,0.0
Loading

0 comments on commit 99b3b72

Please sign in to comment.