Skip to content

Commit

Permalink
Extensions: fixed the left join (#19)
Browse files Browse the repository at this point in the history
* changed join as the left/right were incorret

* linting
  • Loading branch information
taddyb authored Apr 3, 2024
1 parent aa2a581 commit 9b930cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion marquette/conf/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: MERIT
data_path: /projects/mhpi/data/${name}
zone: 72
zone: 75
create_edges:
buffer: 0.3334
dx: 2000
Expand Down
5 changes: 4 additions & 1 deletion marquette/merit/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 9b930cd

Please sign in to comment.