Last active
April 11, 2024 13:56
-
-
Save rileyhales/e94f0c51090f26bc396e2289d41edefd to your computer and use it in GitHub Desktop.
GEOGLOWS Tutorials Snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
path_to_modal_metadata_table = './v2-model-table.parquet' | |
metadata_table = pd.read_parquet(path_to_modal_metadata_table) | |
river_of_interest = 780035587 | |
terminal_link = metadata_table.loc[metadata_table['LINKNO'] == river_of_interest, 'TerminalLink'].values[0] | |
rivers_in_watershed = metadata_table.loc[metadata_table['TerminalLink'] == terminal_link, 'LINKNO'].values.flatten() | |
print(rivers_in_watershed) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment