From 9b930cd899b7c64bc3c2c5417ea884897cc8e47b Mon Sep 17 00:00:00 2001 From: Tadd Bindas Date: Wed, 3 Apr 2024 17:44:07 -0400 Subject: [PATCH] Extensions: fixed the left join (#19) * changed join as the left/right were incorret * linting --- marquette/conf/config.yaml | 2 +- marquette/merit/extensions.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/marquette/conf/config.yaml b/marquette/conf/config.yaml index 84c03f6..2533df3 100644 --- a/marquette/conf/config.yaml +++ b/marquette/conf/config.yaml @@ -1,6 +1,6 @@ name: MERIT data_path: /projects/mhpi/data/${name} -zone: 72 +zone: 75 create_edges: buffer: 0.3334 dx: 2000 diff --git a/marquette/merit/extensions.py b/marquette/merit/extensions.py index 81ae366..d9f4fef 100644 --- a/marquette/merit/extensions.py +++ b/marquette/merit/extensions.py @@ -116,8 +116,11 @@ def soils_data(cfg: DictConfig, edges: zarr.Group) -> None: ) .otherwise(pl.col(["OM_05_M_25", "Cl_05_Mn", "Sd_05_Mn", "St_05_Mn"])) ) + graph_cols = ["COMID", "up1", "NextDownID"] + df_cols = graph_cols + attributes + _df = df_filled.select(pl.col(df_cols)) edges_df = pl.DataFrame({"COMID": edges.merit_basin[:]}) - joined_df = df_filled.join(edges_df, on="COMID", how="left", join_nulls=True) + joined_df = edges_df.join(_df, on="COMID", how="left", join_nulls=True) for i in range(len(names)): edges.array( name=names[i],