Skip to content

Commit

Permalink
minor changes to compare model_runs
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlan-git committed Dec 5, 2024
1 parent be0ab3e commit 7bc59a7
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions scripts/compile_model_runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# input[["#link_id", "geometry"]].to_file(output_dir / "test_geom.geojson")

scenarios_to_consolidate = (12,)
runs_to_consolidate = (15, 22, 26)
runs_to_consolidate = (15, 22, 26, 27)
# runs_to_consolidate = (15, 22)
# %%

Expand Down Expand Up @@ -160,7 +160,8 @@ def combine_tables(dfs, columns_same):
rename_dict = {
15: "run 15 old code, emme 4.6.1",
22: "run 22 previous version of pr, open paths",
26: "run 26 final version of pr, emme 4.6.1"
26: "run 26 final version of pr, emme 4.6.1",
27: "run 27, PR with dropping maz no drive network",
}
ft_map = {
1.: "Freeway",
Expand Down Expand Up @@ -190,19 +191,24 @@ def combine_tables(dfs, columns_same):
from scipy import stats
for i in range(1, 7):
slicer = plotting_table["ft"] == i
x = plotting_table.loc[slicer, "@volau_run22_scenAM"]
y = plotting_table.loc[slicer, "@volau_run26_scenAM"]
x = plotting_table.loc[slicer, "@volau_run15_scenAM"]
y = plotting_table.loc[slicer, "@volau_run27_scenAM"]
plt.scatter(x, y, label=f'ft = {i}')
plt.xlabel("run 22")
plt.ylabel("run 26")
plt.xlabel("run 15")
plt.ylabel("run 27")
print(stats.linregress(x, y))
print(i)
plt.show()
# plt.show()
plt.legend()
#%%

no_vol_links = links_wide_table[(links_wide_table["@volau_run27_scenAM"] < 1) & (links_wide_table["ft"] == 1)]
slicer = (no_vol_links["@volau_run15_scenAM"] > 1)
no_vol_links[slicer]
#%%
vol_pairs_to_compare = [
("@volau_run15_scenAM", "@volau_run26_scenAM"),
("@volau_run22_scenAM", "@volau_run26_scenAM"),
("@volau_run15_scenAM", "@volau_run27_scenAM"),
# ("@volau_run22_scenAM", "@volau_run26_scenAM"),
# ("@volau_run23_scenAM", "@volau_run25_scenAM"),
]
rename_dict = {
Expand Down

0 comments on commit 7bc59a7

Please sign in to comment.