Skip to content

Instantly share code, notes, and snippets.

@rileyhales
Last active April 11, 2024 13:56
Show Gist options
  • Save rileyhales/e94f0c51090f26bc396e2289d41edefd to your computer and use it in GitHub Desktop.
Save rileyhales/e94f0c51090f26bc396e2289d41edefd to your computer and use it in GitHub Desktop.
GEOGLOWS Tutorials Snippets
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